mirror of
https://github.com/nvim-treesitter/nvim-treesitter-context
synced 2024-09-16 14:14:03 +02:00
6e53eecca4
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. |
||
---|---|---|
.. | ||
context.scm |