feat(treesitter): added incremental selection
This commit is contained in:
1 file changed
+13
-1
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user