vim/treesitter: make sure to load plugin on commands
This commit is contained in:
parent
1371715363
commit
deb327e5ce
1 changed files with 13 additions and 11 deletions
|
@ -8,7 +8,6 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
main = 'nvim-treesitter.configs',
|
main = 'nvim-treesitter.configs',
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'bash',
|
'bash',
|
||||||
|
@ -29,14 +28,12 @@ return {
|
||||||
'vimdoc',
|
'vimdoc',
|
||||||
'yaml',
|
'yaml',
|
||||||
},
|
},
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = {
|
disable = {
|
||||||
'vimdoc',
|
'vimdoc',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
@ -46,18 +43,15 @@ return {
|
||||||
scope_incremental = nil, -- disabled, normally mapped in visual mode
|
scope_incremental = nil, -- disabled, normally mapped in visual mode
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
refactor = {
|
refactor = {
|
||||||
highlight_definitions = { enable = true },
|
highlight_definitions = { enable = true },
|
||||||
highlight_current_scope = { enable = false },
|
highlight_current_scope = { enable = false },
|
||||||
|
|
||||||
smart_rename = {
|
smart_rename = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
smart_rename = 'grr',
|
smart_rename = 'grr',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
navigation = {
|
navigation = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
@ -69,7 +63,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -87,14 +80,23 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
playground = {
|
playground = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
event = {
|
||||||
event = { 'BufReadPost', 'BufNewFile' },
|
'BufReadPost',
|
||||||
|
'BufNewFile'
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
'TSInstall',
|
||||||
|
'TSUninstall',
|
||||||
|
'TSUpdate',
|
||||||
|
'TSUpdateSync',
|
||||||
|
'TSInstallInfo',
|
||||||
|
'TSInstallSync',
|
||||||
|
'TSInstallFromGrammar',
|
||||||
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>tp', '<cmd>TSPlaygroundToggle<cr>' },
|
{ '<leader>tp', '<cmd>TSPlaygroundToggle<cr>' },
|
||||||
{ '<leader>th', '<cmd>TSHighlightCapturesUnderCursor<cr>' },
|
{ '<leader>th', '<cmd>TSHighlightCapturesUnderCursor<cr>' },
|
||||||
|
|
Loading…
Add table
Reference in a new issue