mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 08:20:05 -04:00
feat: add fusion grammar and highlights
This commit is contained in:
parent
fbbcfa7b6c
commit
979c32493d
7 changed files with 235 additions and 0 deletions
87
queries/fusion/highlights.scm
Normal file
87
queries/fusion/highlights.scm
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
(comment) @comment
|
||||
|
||||
; identifiers eel
|
||||
|
||||
(eel_object_path
|
||||
(eel_path_identifier) @variable)
|
||||
|
||||
(eel_object_pair
|
||||
key: (eel_property_name) @property)
|
||||
|
||||
(eel_method_name) @function
|
||||
|
||||
(eel_parameter) @variable
|
||||
|
||||
|
||||
|
||||
; identifiers fusion
|
||||
; -----------
|
||||
|
||||
(path_part) @property
|
||||
(meta_property) @attribute
|
||||
(prototype_signature
|
||||
"prototype" @keyword
|
||||
|
||||
)
|
||||
(include_statement
|
||||
"include" @include
|
||||
":" @punctation.delimiter
|
||||
(source_file) @uri
|
||||
)
|
||||
|
||||
(namespace_declaration
|
||||
"namespace" @keyword
|
||||
(alias_namespace) @namespace)
|
||||
|
||||
(identifier_type
|
||||
name: (type_name) @type)
|
||||
|
||||
; tokens
|
||||
; ------
|
||||
|
||||
[
|
||||
(identifier_package)
|
||||
(alias_namespace)
|
||||
] @namespace
|
||||
|
||||
[
|
||||
"="
|
||||
"<"
|
||||
"&&"
|
||||
"and"
|
||||
"||"
|
||||
"or"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"+"
|
||||
"-"
|
||||
"!"
|
||||
"not"
|
||||
(deletion)
|
||||
] @operator
|
||||
|
||||
(string) @string
|
||||
(number) @number
|
||||
(boolean) @boolean
|
||||
(null) @constant.builtin
|
||||
|
||||
|
||||
; punctation
|
||||
; ----------
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
] @punctation.bracket
|
||||
|
||||
[
|
||||
":"
|
||||
"."
|
||||
"?"
|
||||
] @punctation.delimiter
|
||||
|
||||
3
queries/fusion/locals.scm
Normal file
3
queries/fusion/locals.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(eel_arrow_function) @local.scope
|
||||
|
||||
(eel_parameter) @local.definition
|
||||
Loading…
Add table
Add a link
Reference in a new issue