From befb9b505a80e2a0dd7e3a49ec0917a2b34666e4 Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Tue, 23 Jan 2024 21:59:32 -0600 Subject: [PATCH] add highlights and try filetype --- quieries/highlight.scm | 59 ++++++++++++++++++++++++++++++++++++ tests/{test.conf => test.ls} | 0 2 files changed, 59 insertions(+) create mode 100644 quieries/highlight.scm rename tests/{test.conf => test.ls} (100%) diff --git a/quieries/highlight.scm b/quieries/highlight.scm new file mode 100644 index 0000000..9d8a424 --- /dev/null +++ b/quieries/highlight.scm @@ -0,0 +1,59 @@ +; Keywords + +[ + "input" + "output" + "filter" +] @keyword + +((identifier) @keyword + (#match? @keyword "^(private|protected|public)$")) + +; Literals + +[ + (string) + (bareword) +] @string + +(regex) @string.special.regex +(escape_sequence) @escape + +[ + (number) +] @number + +[ + (nil) + (true) + (false) +]@constant.builtin + +(interpolation + "%{" @punctuation.special + "}" @punctuation.special) @embedded + +(comment) @comment + +; Operators + +[ +"=" +"=>" +"->" +] @operator + +[ + "," + ";" + "." +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket diff --git a/tests/test.conf b/tests/test.ls similarity index 100% rename from tests/test.conf rename to tests/test.ls