mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -04:00
feat: add liquidsoap
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
This commit is contained in:
parent
eb96ca52a7
commit
691fdc61a1
7 changed files with 187 additions and 0 deletions
21
queries/liquidsoap/folds.scm
Normal file
21
queries/liquidsoap/folds.scm
Normal file
|
|
@ -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
|
||||
85
queries/liquidsoap/highlights.scm
Normal file
85
queries/liquidsoap/highlights.scm
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
(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"
|
||||
] @repeat
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"elsif"
|
||||
"else"
|
||||
"if_end"
|
||||
] @conditional
|
||||
|
||||
[
|
||||
"try"
|
||||
"catch"
|
||||
"try_end"
|
||||
] @exception
|
||||
|
||||
(inline_if [ "?" ":" ] @conditional.ternary)
|
||||
|
||||
[
|
||||
"%ifdef"
|
||||
"%ifndef"
|
||||
"%ifencoder"
|
||||
"%ifnencoder"
|
||||
"%ifversion"
|
||||
"%else"
|
||||
"%endif"
|
||||
"%argsof"
|
||||
"%include"
|
||||
] @preproc
|
||||
|
||||
(encoder_name) @constant.builtin
|
||||
|
||||
(anonymous_argument (var) @parameter)
|
||||
(labeled_argument label: (var) @parameter)
|
||||
|
||||
"." @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(app name: (var) @function.call)
|
||||
(method) @method
|
||||
(method_app) @method.call
|
||||
|
||||
(string) @string
|
||||
(string_interpolation [ "#{" "}" ] @punctuation.special)
|
||||
(integer) @number
|
||||
(float) @float
|
||||
(bool) @boolean
|
||||
(comment) @comment
|
||||
(regexp) @string.regex
|
||||
(type) @type
|
||||
54
queries/liquidsoap/indents.scm
Normal file
54
queries/liquidsoap/indents.scm
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
[
|
||||
"%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
|
||||
15
queries/liquidsoap/locals.scm
Normal file
15
queries/liquidsoap/locals.scm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[(anonymous_function) (binding) (def) (let)] @scope
|
||||
|
||||
(anonymous_argument (var) @definition.parameter)
|
||||
(labeled_argument label: (var) @definition.parameter)
|
||||
|
||||
(binding
|
||||
defined: (var) @definition.var)
|
||||
(def defined: (var) @definition.var)
|
||||
(let defined: (var) @definition.var)
|
||||
(meth_pattern (var) @definition.var)
|
||||
(list_pattern (var) @definition.var)
|
||||
(tuple_pattern (var) @definition.var)
|
||||
(spread (var) @definition.var)
|
||||
|
||||
(var) @reference
|
||||
Loading…
Add table
Add a link
Reference in a new issue