nvim-treesitter/queries/fsh/highlights.scm
Christian Clason 99ddf57353
feat(highlights)!: enforce documented captures (#6232)
Problem: Allowing undocumented "secret" (sub)captures makes it harder
to write comprehensive colorschemes and catch inconsistent captures.

Solution: Only allow captures listed in CONTRIBUTING.md. Add useful
(cross-language) subcaptures and drop language-specific or too niche
ones.

Follow-up: Adding further `*.builtin` captures and changing queries to
use them.

Language-specific subcaptures should instead be added in user config or
a custom language plugin.
2024-03-03 11:00:11 +01:00

97 lines
1,002 B
Scheme

[
"("
")"
] @punctuation.bracket
[
"^"
"="
":"
] @operator
[
"#"
".."
"*"
"->"
] @punctuation.special
; Entities
[
"Profile"
"Alias"
"Extension"
"Invariant"
"Instance"
"ValueSet"
"CodeSystem"
"Mapping"
"Logical"
"Resource"
"RuleSet"
] @keyword
; Metadata Keywords
[
"Parent"
"Title"
"Description"
"Id"
"Severity"
"InstanceOf"
"Usage"
"Source"
"XPath"
"Target"
] @keyword
; Rule Keywords
[
"contentReference"
"insert"
"and"
"or"
"contains"
"named"
"only"
"obeys"
"valueset"
"codes"
"from"
"include"
"exclude"
"where"
"system"
"exactly"
] @keyword.operator
; Types
[
"Reference"
"Canonical"
] @type.builtin
(sd_metadata
(parent
(name))) @type
(target_type
(name)) @type
; Strings
(string) @string
(multiline_string) @string
; Constants
(strength_value) @constant
(bool) @boolean
(flag) @constant
; Special Params
(code_value) @variable.parameter
; Extras
(fsh_comment) @comment @spell