nvim-treesitter/runtime/queries/rst/locals.scm

39 lines
638 B
Scheme
Raw Normal View History

2024-01-06 15:05:50 +09:00
; Scopes
(document) @local.scope
2020-07-26 09:38:53 -05:00
(directive) @local.scope
2020-07-26 09:38:53 -05:00
2024-01-06 15:05:50 +09:00
; Definitions
(title) @local.definition
2020-07-26 09:38:53 -05:00
(substitution_definition
name: (substitution) @local.definition)
2020-07-26 09:38:53 -05:00
(footnote
name: (label) @local.definition)
2020-07-26 09:38:53 -05:00
(citation
name: (label) @local.definition)
2020-07-26 09:38:53 -05:00
(target
name: (name) @local.definition)
2020-07-26 09:38:53 -05:00
; Inline targets
(inline_target) @local.definition
2020-07-26 09:38:53 -05:00
2020-08-01 11:56:15 -05:00
; The role directive can define a new role
((directive
name: (type) @_type
body: (body
(arguments) @local.definition))
2024-01-06 15:05:50 +09:00
(#eq? @_type "role"))
2020-07-26 09:38:53 -05:00
2024-01-06 15:05:50 +09:00
; References
2020-07-26 09:38:53 -05:00
[
2024-01-06 15:05:50 +09:00
(substitution_reference)
(footnote_reference)
(citation_reference)
(reference)
(role)
] @local.reference