mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
119
runtime/queries/runescript/highlights.scm
Normal file
119
runtime/queries/runescript/highlights.scm
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
(local_variable
|
||||
"$" @attribute.builtin)
|
||||
|
||||
(game_variable
|
||||
[
|
||||
"%"
|
||||
".%"
|
||||
] @attribute.builtin)
|
||||
|
||||
(constant_variable
|
||||
"^" @attribute.builtin)
|
||||
|
||||
(parameter
|
||||
(local_variable
|
||||
name: (identifier) @variable.parameter))
|
||||
|
||||
; Scripts
|
||||
(script
|
||||
trigger: (identifier) @keyword.directive
|
||||
subject: (identifier) @function)
|
||||
|
||||
; Calls
|
||||
(call
|
||||
[
|
||||
"~"
|
||||
"@"
|
||||
]? @attribute.builtin
|
||||
callee: (identifier) @function.call)
|
||||
|
||||
; Literals
|
||||
((literal) @boolean
|
||||
(#any-of? @boolean "true" "false"))
|
||||
|
||||
(literal
|
||||
"null" @constant.builtin)
|
||||
|
||||
(integer_literal) @number
|
||||
|
||||
(coord_literal) @string.special
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
[
|
||||
(string_fragment)
|
||||
"\""
|
||||
] @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(string_interpolation
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.special)
|
||||
|
||||
(string_tag) @punctuation.special
|
||||
|
||||
; Types
|
||||
(type) @type
|
||||
|
||||
(parameter_type) @type
|
||||
|
||||
; Tokens
|
||||
[
|
||||
";"
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
"*"
|
||||
"/"
|
||||
"+"
|
||||
"-"
|
||||
"&"
|
||||
"|"
|
||||
">"
|
||||
">="
|
||||
"<"
|
||||
"<="
|
||||
"="
|
||||
"!"
|
||||
] @operator
|
||||
|
||||
(arithmetic
|
||||
"%" @operator)
|
||||
|
||||
[
|
||||
(def_type_keyword)
|
||||
(switch_type_keyword)
|
||||
] @keyword.modifier
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
"while" @keyword.repeat
|
||||
|
||||
[
|
||||
"default"
|
||||
"if"
|
||||
"else"
|
||||
"case"
|
||||
] @keyword.conditional
|
||||
|
||||
"calc" @keyword
|
||||
2
runtime/queries/runescript/injections.scm
Normal file
2
runtime/queries/runescript/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