-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: multiple tree-sitter highlighting bugs
The precedence order for neovim (and now the tree-sitter CLI as well it seems?) is to prefer the last match found rather than the first. This moves ad over to use the same behaviour but I still need to update the existing highlight queries as there are now several places where the ordering is incorrect if we want to maintain the existing highlighting. This should make it easier to port over existing queries from neovim but I'm currently guarding and rejecting queries that use unknown custom predicates (such as neovim's #lua-match) as the resulting highlights are all messed up if we don't correctly implement the same logic used by whichever editor or tool the query was taken from. The tree-sitter tests can now run in CI as I've updated the setup of parsers and TS state to support using Rust crates rather than dynamic linking.
- Loading branch information
Showing
6 changed files
with
225 additions
and
54 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.