Health Check
The first step in troubleshooting should always be running the health check:- Neovim version compatibility (requires 0.11+)
- Tree-sitter ABI version (requires ABI >= 13)
- Required external tools (
tree-sitter,curl,tar) - Installation directory permissions
- Installed parsers and their query files
Common Issues
Parser not found or fails to load
Parser not found or fails to load
Symptoms:
- Error:
Parser not available for language "xxx" - Treesitter features not working for a specific language
-
Verify the parser is installed:
-
Check installation directory is in runtimepath:
Look for the “Install directory for parsers and queries” section.
-
Manually check parser file exists:
-
Reinstall the parser:
The
!forces reinstallation even if the parser exists.
Installation directory not writable
Installation directory not writable
Symptoms:
- Error during
:TSInstall:Could not create directory - Health check reports: “is not writable”
-
Check directory permissions:
-
Set a custom writable directory:
-
Fix permissions (Linux/macOS):
Tree-sitter CLI not found
Tree-sitter CLI not found
Symptoms:
- Error during
:TSInstall:tree-sitter-cli not found - Health check shows “tree-sitter-cli not found”
-
Install tree-sitter CLI (minimum version 0.26.1):
npm:
cargo:Homebrew (macOS):
-
Verify installation:
-
Ensure it’s in PATH:
ABI version mismatch
ABI version mismatch
Symptoms:
- Error:
Parser ABI version mismatch - Health check shows ABI version incompatibility
- Parser loads but crashes or behaves incorrectly
-
Check your Neovim’s ABI version:
nvim-treesitter requires ABI >= 13 (lua/nvim-treesitter/health.lua:9)
-
Update Neovim to version 0.11 or later:
-
Regenerate parser from grammar if parser.c is outdated:
This regenerates parser.c with the correct ABI version.
-
Update all parsers to match current ABI:
Query file errors
Query file errors
Symptoms:
- Error:
Invalid node typeorInvalid field name - Health check shows query errors for specific languages
- Syntax highlighting partially works or breaks
-
Check which query files have errors:
Look for the “The following errors have been detected” section.
-
Identify problematic query files:
-
Update parser and queries together:
-
Clear cached queries (if queries are modified):
- Check for outdated custom queries if you have local overrides.
Curl or tar missing
Curl or tar missing
Symptoms:
- Error during
:TSInstall:curl not foundortar not found - Installation fails to download or extract parsers
-
Install required tools:
Linux (Debian/Ubuntu):
Linux (Fedora/RHEL):macOS:Windows:
- Install Git for Windows which includes curl and tar
- Or use Windows Subsystem for Linux (WSL)
-
Verify tools are accessible:
Installation timeout
Installation timeout
Symptoms:
- Parser installation hangs or times out
- Error:
timeoutafter 60 seconds
-
Check network connectivity:
-
Try installing parsers one at a time:
-
Use synchronous installation with longer timeout:
- Check if another installation is running: The installer prevents concurrent installations of the same language.
Dependency language missing
Dependency language missing
Symptoms:
- Query errors for a language that has dependencies
- Example:
angularrequireshtmlandhtml_tags
-
Manually install dependencies:
-
Check dependency information:
-
Verify all dependencies are installed:
Parsers not updating
Parsers not updating
Symptoms:
:TSUpdatereports “All parsers are up-to-date” but issues persist- Old parser behavior despite update command
-
Check if update is actually needed:
-
Force reinstall:
-
Clear parser cache and reinstall:
Debugging Installation Issues
View Installation Logs
All installation operations are logged. View the logs with:- Download progress
- Compilation output
- Error messages
- File operations
Manual Installation Verification
To manually verify an installation:Platform-Specific Issues
Windows
Common Windows issues:-
Parser file is locked:
- Restart Neovim before updating parsers
- Close all buffers using the parser before updating
-
Path issues with spaces:
- Ensure
install_dirdoesn’t contain spaces - Or use short path names (8.3 format)
- Ensure
-
Git Bash paths:
- Ensure Git Bash is in PATH
- Use forward slashes in
install_dirconfiguration
macOS
Common macOS issues:-
Xcode Command Line Tools required:
-
Permission issues with Homebrew directories:
Linux
Common Linux issues:-
Missing build tools:
-
SELinux issues:
Getting Help
If you’ve tried the solutions above and still have issues:-
Run the health check and save the output:
-
Check the installation logs:
-
Gather system information:
-
Report the issue at nvim-treesitter GitHub with:
- Health check output
- Installation logs
- System information
- Steps to reproduce
See Also
- Configuration - Custom installation directory setup
- Performance - Optimize installation performance
- Commands - Installation command reference