feat(treesitter): Add incremental select for <0.12
This commit adds support for incremental selection when not running nvim-0.12 or later. (As the ability was made a native feature)
This commit is contained in:
parent
a8479c6551
commit
93f5edc2ad
|
|
@ -1,3 +1,5 @@
|
||||||
|
---@module "lazy.nvim"
|
||||||
|
---@type LazySpec
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|
@ -12,4 +14,24 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"MeanderingProgrammer/treesitter-modules.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "<CR>",
|
||||||
|
scope_incremental = "<CR>",
|
||||||
|
node_incremental = "<TAB>",
|
||||||
|
node_decremental = "<S-TAB>",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cond = function ()
|
||||||
|
return (vim.fn.has("nvim-0.12") == 0)
|
||||||
|
end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user