mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 16:30:02 -04:00
- The directive type does not longer includes `::`. - The content of the directives is not longer interpreted as rst, but it uses language injection for it. - Fix a query to allow to capture targets without link. - Reset the content of the math role so it can be highlighted by the injection instead. Problems I found: - Capturing the same node with @language and @content will raise an error. ``` Error detected while processing FileType Autocommands for "*": E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:331: table index is nil ``` Harcoding the language works, Using the offset predicate doesn't work either `(#offset! 0 0 1 0)` nor `(#offset! 0 0 0 5)` - Generating the grammar using `tree-sitter-cli@0.17.x` breaks nvim-treesitter, `@0.16.9` works.
40 lines
562 B
Scheme
40 lines
562 B
Scheme
;; Scopes
|
|
|
|
(document) @scope
|
|
|
|
(directive) @scope
|
|
|
|
;; Definitions
|
|
|
|
(title) @definition
|
|
|
|
(substitution_definition
|
|
name: (substitution) @definition)
|
|
|
|
(footnote
|
|
name: (label) @definition)
|
|
|
|
(citation
|
|
name: (label) @definition)
|
|
|
|
(target
|
|
name: (name) @definition)
|
|
|
|
; Inline targets
|
|
(inline_target) @definition
|
|
|
|
; The role directive can define a new role
|
|
((directive
|
|
name: (type) @_type
|
|
body: (body) @definition)
|
|
(#eq? @_type "role"))
|
|
|
|
;; References
|
|
|
|
[
|
|
(substitution_reference)
|
|
(footnote_reference)
|
|
(citation_reference)
|
|
(reference)
|
|
(role)
|
|
] @reference
|