
nvim-treesitter
github.com/nvim-treesitter/nvim-treesitter- Category
- Developer Tools
- Rank
- No. 167Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- nvim-treesitter
- GitHub
- 14.4k stars
- Date
About
A Neovim plugin that provides tree-sitter parser management and advanced syntax highlighting, folding, and indentation features. It serves as a configuration layer for tree-sitter parsers in Neovim, enabling better code analysis and editing capabilities.
What it does
It keeps language parsers and their matching editor queries synchronized. Those queries describe code regions for highlighting, folds, indentation, embedded languages, definitions, and references.
Why it's ranked here
This is a strong choice for current Neovim users who want maintained parser installation and broad language query coverage. It also exposes clear update, uninstall, health-check, and custom-language workflows.
What's good
Parser operations run asynchronously, while bootstrap scripts can wait for completion. Default settings require no configuration. Custom parsers may come from remote repositories or local checkouts, and query directories follow Neovim’s established runtime precedence.
Tradeoffs
The current rewrite requires Neovim 0.12 or later, plus command-line download tools, a recent Tree-sitter command-line package, and a C compiler. The plugin must load at startup. Features require manual activation, indentation remains experimental, and plugin upgrades require matching parser updates.
How to use it well
Use it when Neovim is your editor and you want managed parsers across several languages. Automate parser updates during plugin installation, then enable features per file type. Do not expect it to replace Neovim’s highlighting and folding engines or your color scheme.
Technical notes+
README.md documents an incompatible rewrite, startup loading, asynchronous installation, parser revision pinning, and manual feature activation. doc/nvim-treesitter.txt defines the Ex command and Lua API surfaces, including install, update, uninstall, availability inspection, and indentation. plugin/filetypes.lua registers parser aliases for Neovim file types. Makefile provides Lua formatting and diagnostics, query formatting, linting and validation, documentation generation, and headless tests through tests/. .tsqueryrc.json constrains supported parser ABI versions and valid query captures. scripts/ci-install.sh contains installation branches for Linux, Darwin, and Windows environments.
Observed
- License
- Apache License 2.0
- Primary implementation
- Lua plugin code with Tree-sitter query collections
- Install surface
- Neovim plugin managers or Vim’s native package feature
- Interfaces
- Neovim Ex commands and a Lua API
- Runtime requirements
- Neovim 0.12 or later, tar, curl, Tree-sitter CLI 0.26.1 or later, and a C compiler
- Platform handling
- Repository automation includes Linux, Darwin, and Windows branches
- Testing structure
- A tests directory exists, and the Makefile runs headless Neovim tests
Read from README.md, Makefile, tests/indent/rust/mod.rs, LICENSE, .luarc.json, .emmyrc.json, .stylua.toml, .styluaignore, .tsqueryrc.json, CONTRIBUTING.md, SUPPORTED_LANGUAGES.md, plugin/filetypes.lua, scripts/ci-install.sh, .github/dependabot.yml, doc/nvim-treesitter.txt.
What it can do
Install and manage tree-sitter language parsers
Language name or parser specification → Installed tree-sitter parser for the specified language
Provide advanced syntax highlighting for code
Source code file in any supported language → Enhanced syntax-highlighted code display
Generate intelligent code folding based on syntax structure
Source code file with nested structures → Foldable code sections based on language syntax
Apply context-aware automatic indentation
Source code being edited → Properly indented code according to language rules
Parse source code into abstract syntax tree
Source code file → Structured syntax tree representation
Enable tree-sitter query execution for code analysis
Tree-sitter query and source code → Query results matching syntax patterns
Tags
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.