A lightweight Tree-sitter parser manager for Neovim.
Although Neovim 0.12 integrated Tree-sitter into the core, it still lacks a built-in parser installer. With nvim-treesitter/nvim-treesitter now archived, this plugin provides a lightweight, actively maintained alternative that makes installing parsers and adding new languages effortless.
tree-sitter-manager.nvim provides a minimal alternative for:
setup()use_repo_queries to use query files bundled in the grammar repo itself{
"romus204/tree-sitter-manager.nvim",
dependencies = {}, -- tree-sitter CLI must be installed system-wide
config = function()
require("tree-sitter-manager").setup({
-- ensure_installed = { "bash", "lua", "python" }, -- list of parsers to install automatically
-- Optional: custom paths
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
})
end
}
You can override built-in language definitions or add entirely new ones via the languages
option in setup(). This keeps repos.lua clean — no changes to the plugin repository are
needed.
require("tree-sitter-manager").setup({
languages = {
cpp = {
install_info = {
url = "https://github.com/myfork/tree-sitter-cpp",
revision = "abc1234",
-- Use the query files that ship with the forked repo instead of
-- the bundled queries. The parser's queries/ directory is copied
-- automatically during installation.
use_repo_queries = true,
},
},
},
})
require("tree-sitter-manager").setup({
languages = {
mylang = {
install_info = {
url = "https://github.com/someone/tree-sitter-mylang",
use_repo_queries = true, -- copy queries/ from the cloned repo
},
},
},
})
use_repo_queries behaviour| Value | Query source |
|---|---|
false (default) |
Queries bundled in runtime/queries/<lang>/ of this plugin |
true |
queries/ directory inside the cloned grammar repository |
If use_repo_queries = true but the repo has no queries/ directory, a warning is shown
and the plugin falls back to the bundled queries automatically.
Treesitter highlighting is enabled by default. If you prefer to use standard regex highlighting for specific languages, use the nohighlight option.
require("tree-sitter-manager").setup({
-- Use regex highlighting for these languages
nohighlight = { "yaml", "zsh" },
})
Alternatively, if you prefer an "opt-in" approach, use the highlight option.
require("tree-sitter-manager").setup({
-- Only enable treesitter highlighting for these languages
highlight = { "lua", "c" },
-- Disable treesitter highlighting
-- highlight = {},
})
:TSManager - Open the parser management interface
i - Install parser under cursorx - Remove parser under cursoru - Update parser under cursorr - Refresh installation statusq / <Esc> - Close window
Syntax highlighting queries (highlights.scm, injections.scm, etc.) were sourced from the archived nvim-treesitter repository and placed in runtime/queries/.
Parser repository URLs in repos.lua are sourced from the archived nvim-treesitter repository.
[!WARNING] These links are provided as-is. Due to the large number of parsers, each URL cannot be manually verified for current availability or compatibility. If you encounter a broken link, outdated revision, or build failure, please:
- Open an issue with details
- Or submit a pull request with a fix
Your contributions help keep this plugin reliable for everyone.
Pull requests are welcome! Especially for: