1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,107 @@
; Identifiers
[
(field)
(field_identifier)
] @variable.member
(variable) @variable
; Function calls
(function_call
function: (identifier) @function)
(method_call
method: (selector_expression
field: (field_identifier) @function))
; Builtin functions
(function_call
function: (identifier) @function.builtin
(#any-of? @function.builtin
"and" "call" "html" "index" "slice" "js" "len" "not" "or" "print" "printf" "println" "urlquery"
"eq" "ne" "lt" "ge" "gt" "ge"))
; Operators
[
"|"
":="
] @operator
; Delimiters
[
"."
","
] @punctuation.delimiter
[
"{{"
"}}"
"{{-"
"-}}"
")"
"("
] @punctuation.bracket
; Actions
(if_action
[
"if"
"else"
"else if"
"end"
] @keyword.conditional)
(range_action
[
"range"
"else"
"end"
] @keyword.repeat)
(template_action
"template" @function.builtin)
(block_action
[
"block"
"end"
] @keyword.directive)
(define_action
[
"define"
"end"
] @keyword.directive.define)
(with_action
[
"with"
"else"
"end"
] @keyword.conditional)
; Literals
[
(interpreted_string_literal)
(raw_string_literal)
] @string
(rune_literal) @string.special.symbol
(escape_sequence) @string.escape
[
(int_literal)
(imaginary_literal)
] @number
(float_literal) @number.float
[
(true)
(false)
] @boolean
(nil) @constant.builtin
(comment) @comment @spell

View File

@ -0,0 +1,31 @@
((comment) @injection.content
(#set! injection.language "comment"))
; {{"put" | printf "%s%s" "out" | printf "%q"}}
(function_call
function: (identifier) @_function
arguments: (argument_list
.
(interpreted_string_literal) @injection.content)
(#eq? @_function "printf")
(#set! injection.language "printf"))
; {{ js "var a = 1 + 1" }}
(function_call
function: (identifier) @_function
arguments: (argument_list
.
(interpreted_string_literal) @injection.content)
(#eq? @_function "js")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "javascript"))
; {{ html "<h1>hello</h1>" }}
(function_call
function: (identifier) @_function
arguments: (argument_list
.
(interpreted_string_literal) @injection.content)
(#eq? @_function "html")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "html"))