projects
/
vimconf.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b48407f
)
plugins: Add nvim-treesitter-refactor
author
Stefan Huber <shuber@sthu.org>
Sat, 18 Dec 2021 12:56:33 +0000
(13:56 +0100)
committer
Stefan Huber <shuber@sthu.org>
Sat, 18 Dec 2021 12:56:33 +0000
(13:56 +0100)
init.vim
patch
|
blob
|
history
plugins.vim
patch
|
blob
|
history
diff --git
a/init.vim
b/init.vim
index 8392c284ebc30fc9ea2739352523d0318d321fdb..e16c816ab01c0e34e04225ee80ac74f6200eb2e3 100644
(file)
--- a/
init.vim
+++ b/
init.vim
@@
-346,6
+346,7
@@
if $USER != "root" && g:lowendbox == 0
\ ]
if has('nvim-0.5')
\ ]
if has('nvim-0.5')
+ set foldexpr=nvim_treesitter#foldexpr()
lua <<EOF
require'nvim-treesitter.configs'.setup {
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
lua <<EOF
require'nvim-treesitter.configs'.setup {
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
@@
-357,16
+358,45
@@
lua <<EOF
enable = true,
disabled = {}
},
enable = true,
disabled = {}
},
- in
cremental_selection
= {
+ in
dent
= {
enable = true
},
enable = true
},
+ incremental_selection = {
+ enable = true,
+ keymaps = {
+ init_selection = "gnn",
+ node_incremental = "grn",
+ scope_incremental = "grc",
+ node_decremental = "grm",
+ },
+ },
textobjects = {
enable = true
textobjects = {
enable = true
- }
+ },
+ refactor = {
+ highlight_definitions = {
+ enable = true
+ },
+ smart_rename = {
+ enable = true,
+ keymaps = {
+ smart_rename = "grr",
+ },
+ },
+ navigation = {
+ enable = true,
+ keymaps = {
+ goto_definition = "gnd",
+ list_definitions = "gnD",
+ list_definitions_toc = "gO",
+ goto_next_usage = "<a-*>",
+ goto_previous_usage = "<a-#>",
+ },
+ },
+ },
}
EOF
endif
}
EOF
endif
-
endif
endif
diff --git
a/plugins.vim
b/plugins.vim
index a0dde68f621f736c6771e694afc05521a115c433..9adf584fb5d7c40301a10e03677cb7262fd2de0b 100644
(file)
--- a/
plugins.vim
+++ b/
plugins.vim
@@
-106,6
+106,7
@@
if $USER != "root"
if has('nvim-0.5')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
if has('nvim-0.5')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
+ Plug 'nvim-treesitter/nvim-treesitter-refactor', {'do': ':TSUpdate'}
else
Plug 'sheerun/vim-polyglot'
endif
else
Plug 'sheerun/vim-polyglot'
endif