Overview
The:TSLog command displays all messages and output from previous parser operations, including installations, updates, and uninstalls. This is useful for debugging installation issues or reviewing operation history.
Syntax
Behavior
- Opens a buffer displaying log messages from parser operations
- Shows output from install, update, and uninstall commands
- Includes compilation output, errors, and success messages
- Logs persist across Neovim sessions
The log view is particularly helpful for diagnosing why a parser installation failed, as it includes full compiler output and error messages.
Use Cases
Debugging installation failures
If:TSInstall fails silently or with minimal information:
- Compiler errors and warnings
- Missing dependencies
- Network issues during download
- File system permission problems
Reviewing operation history
Check what operations were performed:- Which parsers were installed and when
- Update results for each parser
- Uninstall confirmations
Verifying successful operations
Confirm that batch operations completed successfully:Log Contents
The log typically includes:- Operation type: Install, update, or uninstall
- Language names: Which parsers were affected
- Timestamps: When operations occurred
- Compilation output: Compiler warnings and errors
- Network activity: Download progress and failures
- Success/failure status: Summary of results
Example Log Output
Troubleshooting with TSLog
Check for missing build tools
Look for errors mentioning:gcc,clang, orccnot found- Missing C compiler
- Build tool configuration issues
Identify network issues
Look for:- Connection timeout messages
- Git clone failures
- Download interruptions
Verify parser compatibility
Check for:- ABI version mismatches
- Neovim version requirements
- Treesitter library compatibility
Related Commands
:TSInstall- Install parsers (generates logs):TSUpdate- Update parsers (generates logs):TSUninstall- Remove parsers (generates logs):checkhealth nvim-treesitter- Check parser status and configuration
Source Implementation
Implemented inplugin/nvim-treesitter.lua:71-75: