First working highlighting implementation
This commit is contained in:
parent
0dbd7474e6
commit
748ef644ba
@ -8,4 +8,4 @@ repository = "https://git.hibas.dev/hibas123/jrpc-syntax-zed"
|
|||||||
|
|
||||||
[grammars.jrpc]
|
[grammars.jrpc]
|
||||||
repository = "https://git.hibas.dev/hibas123/tree-sitter-jrpc"
|
repository = "https://git.hibas.dev/hibas123/tree-sitter-jrpc"
|
||||||
commit = "69a6f0444e0c52384d8b252e1c226565eec72c4f"
|
commit = "6763d967af5d748cc86fdcb97ab8f609a9b69c2c"
|
||||||
|
@ -2,3 +2,4 @@ name = "JRPC"
|
|||||||
grammar = "jrpc"
|
grammar = "jrpc"
|
||||||
path_suffixes = ["jrpc"]
|
path_suffixes = ["jrpc"]
|
||||||
line_comments = ["// "]
|
line_comments = ["// "]
|
||||||
|
brackets = [{ start = "{", end = "}", close = true, newline = true }]
|
||||||
|
@ -1,4 +1,33 @@
|
|||||||
|
[
|
||||||
|
"import"
|
||||||
|
"define"
|
||||||
|
"type"
|
||||||
|
"enum"
|
||||||
|
"service"
|
||||||
|
"notification"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(type) @type
|
||||||
|
|
||||||
|
(import_declaration source: (string) @string)
|
||||||
|
|
||||||
|
(define_declaration key: (identifier) @type.definition)
|
||||||
|
|
||||||
|
(type_declaration name: (identifier) @type.definition)
|
||||||
|
|
||||||
|
(attribute (pair key: (identifier) @attribute))
|
||||||
|
|
||||||
|
(enum_declaration name: (identifier) @type.definition)
|
||||||
|
(enum_value_declaration) @enum
|
||||||
|
(enum_value_assignment (identifier) @enum)
|
||||||
|
(enum_value_assignment (number) @number)
|
||||||
|
|
||||||
|
(service_declaration name: (identifier) @type.definition)
|
||||||
|
(function_decorator name: (identifier) @comment)
|
||||||
|
(service_function name: (identifier) @function)
|
||||||
|
(function_argument name: (identifier) @attribute)
|
||||||
|
(service_notification name: (identifier) @function)
|
||||||
|
|
||||||
|
|
||||||
(string) @string
|
(string) @string
|
||||||
(number) @number
|
(number) @number
|
||||||
(pair
|
|
||||||
key: (string) @property.name)
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
(object "}" @end) @indent
|
|
Loading…
Reference in New Issue
Block a user