-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: (BREAKING PLEASE READ) use queries for determining context (#198)
This plugin has been significantly rewritten to use Treesitter queries instead of patterns for determining context regions for languages. The main benefits of this change are: - it is a much simpler implementation since we can leverage core APIs. - it fits in more generally with the Treesitter eco-system. - it allows configuration of contexts to be provided from multiples sources. - it allows more sophisticated configuration of contexts since queries (with directives and predicates) are much more powerful than patterns. - the query format should be usable for other editors. The major downside of this new implementation is that it requires each language to provide it's own query as opposed to using the general purpose patterns. This means that some languages which had contexts before may not have them now. If this is the case then please raise an issue. Adding queries for a specific language is fairly simple but too much work to implement for all 170+ parsers that exist. This commits provides explicit support for: - bash - c - cpp - typescript - rust - json - lua - markdown - python - yaml - php - scala - teal - toml - vim Please see the README for instructions on how to add support for other languages. This commit also drops explicit support for Nvim 0.7. If you still need support for this version then you can use the `compat/0.7` release.
- Loading branch information
Showing
24 changed files
with
1,141 additions
and
506 deletions.
There are no files selected for viewing
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.