add treesitter textobjects

This commit is contained in:
nganhkhoa 2021-07-15 03:41:13 +07:00
parent cf9d046c43
commit f4a4639198
2 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,12 @@
(treesitter.setup {:ensure_installed ["c" "cpp" "python" "go" "rust" "javascript" "lua"] (treesitter.setup {:ensure_installed ["c" "cpp" "python" "go" "rust" "javascript" "lua"]
:highlight {:enable true} :highlight {:enable true}
:indent {:enable true}}) :indent {:enable true}
:textobjects {:select {:enable true
:keymaps {:ia "@parameter.inner"
:oa "@parameter.outer"}}
:swap {:enable true
:swap_next {:<S-l> "@parameter.inner"}
:swap_previous {:<S-h> "@parameter.inner"}}}})
(set nvim.o.completeopt "menuone,noselect") (set nvim.o.completeopt "menuone,noselect")

View File

@ -28,6 +28,7 @@
(use :nelstrom/vim-visual-star-search) (use :nelstrom/vim-visual-star-search)
(use {1 :nvim-treesitter/nvim-treesitter :run ":TSUpdate"}) (use {1 :nvim-treesitter/nvim-treesitter :run ":TSUpdate"})
(use :nvim-treesitter/nvim-treesitter-textobjects)
(use :hrsh7th/nvim-compe) (use :hrsh7th/nvim-compe)
(use :neovim/nvim-lspconfig) (use :neovim/nvim-lspconfig)