mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02: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
|
||||
(identifier) @property)
|
||||
(identifier) @tag.attribute)
|
||||
|
||||
(property
|
||||
(path) @property)
|
||||
|
@ -15,13 +24,20 @@
|
|||
|
||||
(float) @number.float
|
||||
|
||||
(true) @constant.builtin
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
(false) @constant.builtin
|
||||
(null) @constant.builtin
|
||||
|
||||
(array
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket)
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
|
@ -29,3 +45,5 @@
|
|||
] @punctuation.bracket
|
||||
|
||||
"=" @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…
Reference in a new issue