mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-10 17:34:34 +02:00
feat(treesitter): added incremental selection
This commit is contained in:
parent
bf31eccae2
commit
3af1922f21
1 changed files with 13 additions and 1 deletions
|
@ -3,9 +3,12 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
event = "BufReadPost",
|
event = "BufReadPost",
|
||||||
|
keys = {
|
||||||
|
{ "<c-space>", desc = "Increment selection" },
|
||||||
|
{ "<c-bs>", desc = "Schrink selection" },
|
||||||
|
},
|
||||||
---@type TSConfig
|
---@type TSConfig
|
||||||
opts = {
|
opts = {
|
||||||
sync_install = false,
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
context_commentstring = { enable = true, enable_autocmd = false },
|
context_commentstring = { enable = true, enable_autocmd = false },
|
||||||
|
@ -26,6 +29,15 @@ return {
|
||||||
"vim",
|
"vim",
|
||||||
"yaml",
|
"yaml",
|
||||||
},
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "<C-space>",
|
||||||
|
node_incremental = "<C-space>",
|
||||||
|
scope_incremental = false,
|
||||||
|
node_decremental = "<C-bs>",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
---@param opts TSConfig
|
---@param opts TSConfig
|
||||||
config = function(plugin, opts)
|
config = function(plugin, opts)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue