diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/liquidsoap | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/liquidsoap')
| -rw-r--r-- | runtime/queries/liquidsoap/folds.scm | 21 | ||||
| -rw-r--r-- | runtime/queries/liquidsoap/highlights.scm | 111 | ||||
| -rw-r--r-- | runtime/queries/liquidsoap/indents.scm | 66 | ||||
| -rw-r--r-- | runtime/queries/liquidsoap/injections.scm | 2 | ||||
| -rw-r--r-- | runtime/queries/liquidsoap/locals.scm | 35 |
5 files changed, 235 insertions, 0 deletions
diff --git a/runtime/queries/liquidsoap/folds.scm b/runtime/queries/liquidsoap/folds.scm new file mode 100644 index 000000000..56e4ce547 --- /dev/null +++ b/runtime/queries/liquidsoap/folds.scm @@ -0,0 +1,21 @@ +[ + (let) + (binding) + (simple_fun) + (def) + (arglist) + (if) + (if_condition) + (if_then) + (elsif_condition) + (elsif_then) + (if_else) + (for) + (for_do) + (while) + (while_do) + (try) + (try_body) + (try_do) + (block) +] @fold diff --git a/runtime/queries/liquidsoap/highlights.scm b/runtime/queries/liquidsoap/highlights.scm new file mode 100644 index 000000000..c5608f897 --- /dev/null +++ b/runtime/queries/liquidsoap/highlights.scm @@ -0,0 +1,111 @@ +(var) @variable + +(op) @operator + +[ + "and" + "or" + "not" +] @keyword.operator + +[ + "def" + "fun" + "def_end" +] @keyword.function + +(let_decoration) @keyword.coroutine + +[ + "open" + "begin" + "block_end" + "let" +] @keyword + +[ + "while" + "do" + "to" + "for" + "for_end" + "while_end" +] @keyword.repeat + +[ + "if" + "then" + "elsif" + "else" + "if_end" +] @keyword.conditional + +[ + "try" + "catch" + "try_end" +] @keyword.exception + +(inline_if + [ + "?" + ":" + ] @keyword.conditional.ternary) + +[ + "%ifdef" + "%ifndef" + "%ifencoder" + "%ifnencoder" + "%ifversion" + "%else" + "%endif" + "%argsof" + "%include" +] @keyword.directive + +(encoder_name) @constant.builtin + +(anonymous_argument + (var) @variable.parameter) + +(labeled_argument + label: (var) @variable.parameter) + +"." @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +(app + name: (var) @function.call) + +(method) @function.method + +(method_app) @function.method.call + +(string) @string + +(string_interpolation + [ + "#{" + "}" + ] @punctuation.special) + +(integer) @number + +(float) @number.float + +(bool) @boolean + +(comment) @comment @spell + +(regexp) @string.regexp + +(type) @type diff --git a/runtime/queries/liquidsoap/indents.scm b/runtime/queries/liquidsoap/indents.scm new file mode 100644 index 000000000..7cb5935fb --- /dev/null +++ b/runtime/queries/liquidsoap/indents.scm @@ -0,0 +1,66 @@ +[ + "%ifdef" + "%ifndef" + "%ifencoder" + "%ifnencoder" + "%ifversion" + "%else" + "%endif" + "%argsof" + "%include" +] @indent.zero + +[ + "if" + "def" + "let" + "for" + "while" + "try" + "{" + "[" + "(" +] @indent.begin + +(ERROR + "def") @indent.begin + +(def + "def_end" @indent.end) + +(if + "if_end" @indent.end) + +(block + "block_end" @indent.end) + +(for + "for_end" @indent.end) + +(while + "while_end" @indent.end) + +(try + "try_end" @indent.end) + +[ + "then" + "do" + "else" + "elsif" + "catch" +] @indent.branch + +[ + "def_end" + "if_end" + "block_end" + "for_end" + "while_end" + "try_end" + "}" + "]" + ")" +] @indent.branch @indent.end + +(comment) @indent.auto diff --git a/runtime/queries/liquidsoap/injections.scm b/runtime/queries/liquidsoap/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/runtime/queries/liquidsoap/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) diff --git a/runtime/queries/liquidsoap/locals.scm b/runtime/queries/liquidsoap/locals.scm new file mode 100644 index 000000000..995294c03 --- /dev/null +++ b/runtime/queries/liquidsoap/locals.scm @@ -0,0 +1,35 @@ +[ + (anonymous_function) + (binding) + (def) + (let) +] @local.scope + +(anonymous_argument + (var) @local.definition.parameter) + +(labeled_argument + label: (var) @local.definition.parameter) + +(binding + defined: (var) @local.definition.var) + +(def + defined: (var) @local.definition.var) + +(let + defined: (var) @local.definition.var) + +(meth_pattern + (var) @local.definition.var) + +(list_pattern + (var) @local.definition.var) + +(tuple_pattern + (var) @local.definition.var) + +(spread + (var) @local.definition.var) + +(var) @local.reference |
