mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Add documentation for node_movement, rename: textobj -> incremental_selection
This commit is contained in:
parent
d0b84dd89f
commit
a33bccaaf0
2 changed files with 35 additions and 14 deletions
|
|
@ -30,19 +30,29 @@ By default, everything is disabled. To enable support for features, in your `ini
|
|||
>
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
||||
},
|
||||
textobj = { -- this enables incremental selection
|
||||
enable = true,
|
||||
disable = { 'cpp', 'lua' },
|
||||
keymaps = { -- mappings for visual selection
|
||||
node_incremental = "<leader>e", -- "grn" by default,
|
||||
scope_incremental = "<leader>f" -- "grc" by default
|
||||
}
|
||||
},
|
||||
ensure_installed = 'all' -- can be one of 'all', 'language' or {'language1', 'language2' ... }
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
||||
},
|
||||
incremental_selection = { -- this enables incremental selection
|
||||
enable = true,
|
||||
disable = { 'cpp', 'lua' },
|
||||
keymaps = { -- mappings for incremental selection (visual mappings)
|
||||
node_incremental = "<leader>e", -- "grn" by default,
|
||||
scope_incremental = "<leader>f" -- "grc" by default
|
||||
}
|
||||
},
|
||||
node_movement = { -- this cursor movement in node hierachy
|
||||
enable = true,
|
||||
disable = { 'cpp', 'rust' },
|
||||
keymaps = { -- mappings for node movement (normal mappings)
|
||||
move_up = "<a-k>", -- default is to move with alt key hold
|
||||
move_down = "<a-j>",
|
||||
move_left = "<a-h>",
|
||||
move_right = "<a-l>",
|
||||
}
|
||||
},
|
||||
ensure_installed = 'all' -- one of 'all', 'language', or a list of languages
|
||||
}
|
||||
<
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue