reformat queries

This commit is contained in:
Robert Muir 2025-03-19 07:06:15 -04:00
parent 1b5d4b0430
commit 1a28e72cb8
No known key found for this signature in database
2 changed files with 30 additions and 29 deletions

View file

@ -1,7 +1,7 @@
[
(tag_name)
"include"
"exclude"
(tag_name)
"include"
"exclude"
] @nospell @keyword
(identifier) @nospell @variable
@ -15,9 +15,9 @@
parameter_name: (identifier) @variable.parameter)
[
(boolean_type)
(integral_type)
(floating_point_type)
(boolean_type)
(integral_type)
(floating_point_type)
] @nospell @type.builtin
(module
@ -32,9 +32,9 @@
(method
(identifier) @function)
(((method
(identifier) @constructor)
(#match? @constructor "^[A-Z]")))
((method
(identifier) @constructor)
(#match? @constructor "^[A-Z]"))
(member
(identifier) @variable.member)
@ -93,6 +93,6 @@
(param_tag
[
"<"
">"
"<"
">"
] @punctuation.bracket)

View file

@ -1,29 +1,30 @@
;; @value tags without double-quotes
; @value tags without double-quotes
((bare_format_string) @injection.content
(#set! injection.language "printf"))
(#set! injection.language "printf"))
;; @value tags with double quotes
; @value tags with double quotes
((literal_format_string) @injection.content
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "printf"))
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "printf"))
;; injected code snippets
; injected code snippets
((snippet_tag
(attributes
(attribute
name: (identifier) @_attribute_key
value: (attribute_value [
(identifier) @injection.language
(string_literal
(quoted_value) @injection.language)
])))
body: (description) @injection.content)
(#eq? @_attribute_key "lang"))
(attributes
(attribute
name: (identifier) @_attribute_key
value: (attribute_value
[
(identifier) @injection.language
(string_literal
(quoted_value) @injection.language)
])))
body: (description) @injection.content)
(#eq? @_attribute_key "lang"))
;; html content
; html content
((description) @injection.content
(#set! injection.language "html"))
;; markdown content
; markdown content
((markdown_description) @injection.content
(#set! injection.language "markdown_inline"))