🌳 Modern incremental selection for Neovim using the new Tree-sitter API 🌳
Built with the new vim.treesitter API ·
Deterministic selection ·
Hackable & lightweight
nvim-treesitter removed the old incremental_selection module. This plugin brings it back using the new vim.treesitter API — works with every language, stays small, and just works.
{
"shrey99sh/ts-node-select",
version = "release/v0.1.2",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function()
require("ts-node-select").setup()
end,
}use {
"shrey99sh/ts-node-select",
requires = { "nvim-treesitter/nvim-treesitter" },
config = function()
require("ts-node-select").setup()
end,
}| Mode | Key | Action |
|---|---|---|
| Normal | <CR> |
Init selection |
| Visual | <CR> |
Expand selection |
| Visual | <BS> |
Shrink selection |
Place your cursor on any syntax element and press <CR> to start selecting. Keep pressing to expand, press <BS> to shrink back.
require("ts-node-select").setup({
keymaps = {
init = "<leader>si",
expand = "<leader>se",
shrink = "<leader>ss",
},
})- Neovim 0.11+
nvim-treesitter- Tree-sitter parser for your language (
:TSInstall <language>)
If the plugin isn't working, check that the parser is installed and loaded:
:TSInstallInfo
:lua print(vim.treesitter.get_parser(0):lang())Clone the repo, make your changes, and open a pull request. Bug fixes, features, docs — all welcome!
git clone https://github.com/shrey99sh/ts-node-select.gitMIT License © 2026 Shreyansh Vyas