mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
fix(godot_resource): improve highlights
And add a comment injection
This commit is contained in:
parent
aa0c60ca5a
commit
d23192fb17
2 changed files with 26 additions and 6 deletions
|
|
@ -1,7 +1,16 @@
|
||||||
(identifier) @type.builtin
|
(identifier) @variable
|
||||||
|
|
||||||
|
(section
|
||||||
|
(identifier) @tag)
|
||||||
|
|
||||||
|
(section
|
||||||
|
[
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @tag.delimiter)
|
||||||
|
|
||||||
(attribute
|
(attribute
|
||||||
(identifier) @property)
|
(identifier) @tag.attribute)
|
||||||
|
|
||||||
(property
|
(property
|
||||||
(path) @property)
|
(path) @property)
|
||||||
|
|
@ -15,13 +24,20 @@
|
||||||
|
|
||||||
(float) @number.float
|
(float) @number.float
|
||||||
|
|
||||||
(true) @constant.builtin
|
[
|
||||||
|
(true)
|
||||||
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
(false) @constant.builtin
|
(null) @constant.builtin
|
||||||
|
|
||||||
|
(array
|
||||||
|
[
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
] @punctuation.bracket)
|
||||||
|
|
||||||
[
|
[
|
||||||
"["
|
|
||||||
"]"
|
|
||||||
"("
|
"("
|
||||||
")"
|
")"
|
||||||
"{"
|
"{"
|
||||||
|
|
@ -29,3 +45,5 @@
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
"=" @operator
|
"=" @operator
|
||||||
|
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
2
queries/godot_resource/injections.scm
Normal file
2
queries/godot_resource/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue