Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

arborist.nvim

WASM-first tree-sitter parser manager for Neovim 0.12+. Parsers install automatically when you open files. No manual steps, no maintenance.

Install

vim.pack.add({ "https://github.com/arborist-ts/arborist.nvim", }) require("arborist").setup()

Call setup() in your config — with or without options. To customize:

require("arborist").setup({ update_cadence = "weekly", overrides = { my_language = { url = "https://github.com/me/tree-sitter-my-language" }, }, })

All options and their defaults:

OptionDefaultDescription
prefer_wasmtrueTry WASM before native compilation
update_cadence"daily""daily", "weekly", or "manual"
compiler"cc"C compiler for native .so builds
install_populartrueInstall popular language parsers at startup
ensure_installed{}Additional parsers to install eagerly at startup
ignore{}Extra filetypes to skip (merged with registry defaults)
overrides{}Extra parsers not in the registry

Parsers and Queries

Arborist takes a two-pronged approach so everything works out of the box:

Queries for 330 languages are bundled with arborist.nvim, providing syntax highlighting, folds, indents, and injections for every language Neovim supports — no parser needed yet.

Parsers for common languages are installed eagerly at startup when install_popular is enabled (the default). This covers the most popular programming languages, common config/data formats (JSON, YAML, TOML, XML, INI, Dockerfile, Makefile), and parsers needed by popular plugins like render-markdown.nvim (markdown, markdown_inline, html, latex). Set install_popular = false to disable. Use ensure_installed to add parsers beyond the popular set.

Everything else installs on demand — open a file and arborist handles the rest.

How It Works

  1. You open a file
  2. Arborist checks if a parser exists for that filetype
  3. If not, it clones the source and builds one:
    • tree-sitter build --wasm (sandboxed, preferred)
    • tree-sitter build (native .so)
    • cc compilation (fallback)
  4. Highlighting and indentation activate immediately

WASM builds are verified at load time — if the parser fails to load, arborist falls through to native compilation automatically. WASM is skipped entirely if your Neovim build lacks wasmtime.

Parser locations are resolved from a bundled community registry of 327 parsers. Unknown parsers fall back to convention-based lookup in the tree-sitter-grammars and tree-sitter GitHub orgs.

Batch installs group parsers by repository — parsers sharing a repo (e.g. typescript + tsx) clone once and build sequentially, while different repos clone in parallel.

User queries in ~/.config/nvim/queries/ always take highest priority.

Data Sources

Arborist bundles data from two companion repos so it works offline and ships cohesive versions:

DataSourceBundled in
Parser registry (327 parsers)arborist-ts/registryregistry/
Query files (330 languages)arborist-ts/queriesqueries/

Changes flow upstream first: updates are made in the source repos, then synced into arborist.nvim before each release via scripts/sync-upstream.sh. This keeps the upstream repos canonical and arborist.nvim releases self-contained.

Commands

CommandDescription
:ArboristShow installed parsers and status
:ArboristInstall {lang}Install a parser manually
:ArboristUpdateCheck all parsers for updates
:ArboristCleanRemove all arborist-managed parsers
:checkhealth arboristVerify setup, tools, and bundled data

Requirements

  • Neovim 0.12+
  • git
  • tree-sitter CLI (for building from source)
  • A C compiler (fallback when tree-sitter CLI is unavailable)
  • For WASM: Neovim built with ENABLE_WASMTIME=ON

License

MIT

关于 About

Smart, simple, fast tree-sitter parser manager for Neovim 0.12+
neovim-plugin

语言 Languages

Tree-sitter Query95.0%
Lua4.7%
Shell0.2%
Scheme0.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
40
Total Commits
峰值: 34次/周
Less
More

核心贡献者 Contributors