Skip to content

shrey99sh/ts-node-select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts-node-select.

🌳 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.


Installation

lazy.nvim

{
  "shrey99sh/ts-node-select",
  version = "release/v0.1.2",
  dependencies = { "nvim-treesitter/nvim-treesitter" },
  config = function()
    require("ts-node-select").setup()
  end,
}

packer.nvim

use {
  "shrey99sh/ts-node-select",
  requires = { "nvim-treesitter/nvim-treesitter" },
  config = function()
    require("ts-node-select").setup()
  end,
}

Usage

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.


Custom Keymaps

require("ts-node-select").setup({
  keymaps = {
    init   = "<leader>si",
    expand = "<leader>se",
    shrink = "<leader>ss",
  },
})

Requirements

  • Neovim 0.11+
  • nvim-treesitter
  • Tree-sitter parser for your language (:TSInstall <language>)

Troubleshooting

If the plugin isn't working, check that the parser is installed and loaded:

:TSInstallInfo
:lua print(vim.treesitter.get_parser(0):lang())

Contributing

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.git

License

MIT License © 2026 Shreyansh Vyas

About

My take on modern incremental selection in Neovim using Treesitter’s new APIs.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages