Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add treesitter highlighting support in cat mode
Resolve treesitter highlighting metadata to syntax_id needed by nvim_get_hl() in group2ansi() which converts highlighting colours to ANSI escape sequences. Fallback to parsing traditional highlighting if treesitter metadata is not available. This also resolves the issue with no syntax highlighting available at all when treesitter highlighting is active, traditional and treesitter modes are mutually exclusive; that is no traditional highlighting data will be available if treesitter is active for a given buffer. Testing done: * Observed regular and new functionality displaying C and Bash source files in cat mode in traditional highlighting then with treesitter highlighting. * Confirmed that syntax highlighting colours while in treesitter mode match in side by side comparison between nvimpager in cat mode and nvim edit mode.
- Loading branch information