Tree-sitter parser management for Neovim on the main branch of nvim-treesitter.
Tree-sitter parser management for Neovim, built on the main branch of
nvim-treesitter, which
installs parsers but leaves starting them to the user. gardener:
Requirements: Neovim 0.12 or later, and nvim-treesitter on its main branch,
with its requirements (curl, tar, the tree-sitter CLI, and a C compiler).
With lazy.nvim:
{
"tkamucheka/gardener.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
lazy = false,
opts = {
ensure_installed = { "lua", "vim", "vimdoc", "query" },
},
}
With another plugin manager, install both plugins and call
require("gardener").setup(opts).
A parser that nvim-treesitter does not provide is registered with its
install_info, and optionally the filetypes, extensions, and file names that
use it:
opts = {
custom_parsers = {
dottr = {
install_info = {
url = "https://github.com/tkamucheka/tree-sitter-dottr",
queries = "queries",
},
filetypes = { "dottr" },
extensions = { "dotfile" },
},
},
}
Files ending in .dotfile are then detected as the filetype dottr, and
gardener installs and starts the dottr parser in them. All options are
described in the README.