Add highlights and language deff

This commit is contained in:
Preston Baxter 2024-01-23 22:41:20 -06:00
parent befb9b505a
commit 8677d3fdfa
3 changed files with 15 additions and 19 deletions

View File

@ -13,5 +13,13 @@
},
"devDependencies": {
"tree-sitter-cli": "^0.20.8"
},
"tree-sitter": [
{
"scope": "grammar.js",
"file-types": [
"logstash"
]
}
]
}

View File

@ -4,11 +4,11 @@
"input"
"output"
"filter"
"if"
"else"
(plugin_name)
] @keyword
((identifier) @keyword
(#match? @keyword "^(private|protected|public)$"))
; Literals
[
@ -16,36 +16,22 @@
(bareword)
] @string
(regex) @string.special.regex
(escape_sequence) @escape
(regexp) @string.special.regex
[
(number)
] @number
[
(nil)
(true)
(false)
]@constant.builtin
(interpolation
"%{" @punctuation.special
"}" @punctuation.special) @embedded
(comment) @comment
; Operators
[
"="
"=>"
"->"
] @operator
[
","
";"
"."
] @punctuation.delimiter
@ -57,3 +43,5 @@
"{"
"}"
] @punctuation.bracket
(selector_element) @variable.parameter