mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
Fix highlights of module attributes and doc sigils
This commit is contained in:
parent
3f8829cfb8
commit
7a1c404fe7
1 changed files with 10 additions and 2 deletions
|
|
@ -180,7 +180,7 @@
|
||||||
] operator: "/" right: (integer) @operator)
|
] operator: "/" right: (integer) @operator)
|
||||||
])
|
])
|
||||||
|
|
||||||
; Sigils
|
; Non-String Sigils
|
||||||
(sigil
|
(sigil
|
||||||
"~" @string.special
|
"~" @string.special
|
||||||
((sigil_name) @string.special) @_sigil_name
|
((sigil_name) @string.special) @_sigil_name
|
||||||
|
|
@ -189,6 +189,7 @@
|
||||||
((sigil_modifiers) @string.special)?
|
((sigil_modifiers) @string.special)?
|
||||||
(#not-any-of? @_sigil_name "s" "S"))
|
(#not-any-of? @_sigil_name "s" "S"))
|
||||||
|
|
||||||
|
; String Sigils
|
||||||
(sigil
|
(sigil
|
||||||
"~" @string
|
"~" @string
|
||||||
((sigil_name) @string) @_sigil_name
|
((sigil_name) @string) @_sigil_name
|
||||||
|
|
@ -203,7 +204,8 @@
|
||||||
operator: "@"
|
operator: "@"
|
||||||
operand: [
|
operand: [
|
||||||
(identifier)
|
(identifier)
|
||||||
(call target: (identifier) @constant)]) @constant
|
(call target: (identifier))
|
||||||
|
] @constant) @constant
|
||||||
|
|
||||||
; Documentation
|
; Documentation
|
||||||
(unary_operator
|
(unary_operator
|
||||||
|
|
@ -214,4 +216,10 @@
|
||||||
(string)
|
(string)
|
||||||
(boolean)
|
(boolean)
|
||||||
(charlist)
|
(charlist)
|
||||||
|
(sigil
|
||||||
|
"~" @comment
|
||||||
|
((sigil_name) @comment)
|
||||||
|
quoted_start: _ @comment
|
||||||
|
(quoted_content) @comment
|
||||||
|
quoted_end: _ @comment)
|
||||||
] @comment))) @comment
|
] @comment))) @comment
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue