diff --git a/package.json b/package.json index 3eecad8..578ca97 100644 --- a/package.json +++ b/package.json @@ -13,5 +13,13 @@ }, "devDependencies": { "tree-sitter-cli": "^0.20.8" - } + }, + "tree-sitter": [ + { + "scope": "grammar.js", + "file-types": [ + "logstash" + ] + } + ] } diff --git a/quieries/highlight.scm b/queries/highlights.scm similarity index 50% rename from quieries/highlight.scm rename to queries/highlights.scm index 9d8a424..e32cd61 100644 --- a/quieries/highlight.scm +++ b/queries/highlights.scm @@ -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 diff --git a/tests/test.ls b/tests/test.logstash similarity index 100% rename from tests/test.ls rename to tests/test.logstash