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,17 @@
[
(call)
(class)
(closure)
(define_case)
(define_constant)
(define_field)
(define_variable)
(external_function)
(if)
(import)+
(loop)
(match)
(method)
(trait)
(while)
] @fold

View File

@ -0,0 +1,198 @@
; Brackets and operators
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
","
"->"
"."
":"
] @punctuation.delimiter
[
"!="
"%"
"%="
"&"
"&="
"*"
"**"
"**="
"*="
"+"
"+="
"-"
"-="
"/"
"/="
"<"
"<<"
"<<="
"<="
"<="
"=="
">"
">="
">="
">>"
">>="
">>>"
">>>="
"^"
"^="
"|"
"|="
] @operator
; Keywords
[
"as"
"for"
"impl"
"let"
"mut"
"ref"
"uni"
"move"
"recover"
] @keyword
"fn" @keyword.function
"import" @keyword.import
[
"and"
"or"
] @keyword.operator
[
"class"
"trait"
] @keyword.type
[
"extern"
(modifier)
(visibility)
] @keyword.modifier
[
"loop"
"while"
(break)
(next)
] @keyword.repeat
"return" @keyword.return
[
"throw"
"try"
] @keyword.exception
[
"case"
"else"
"if"
"match"
] @keyword.conditional
; Identifiers/variable references
(identifier) @variable
; Comments
(line_comment) @comment @spell
; Literals
(self) @variable.builtin
(nil) @constant.builtin
[
(true)
(false)
] @boolean
(integer) @number
(float) @number.float
(string) @string
(escape_sequence) @string.escape
(interpolation
"${" @punctuation.special
"}" @punctuation.special) @none
(constant) @constant
; Patterns
(integer_pattern) @number
(string_pattern) @string
(constant_pattern) @constant
; Types
(generic_type
name: _ @type)
(type) @type
; Imports
(extern_import
path: _ @string)
(import
(path
(identifier) @module))
; Classes
(class
name: _ @type)
(define_field
name: _ @variable.member)
; Traits
(trait
name: _ @type)
; Implementations
(implement_trait
class: _ @type)
(reopen_class
name: _ @type)
(bound
name: _ @type)
; Methods
(method
name: _ @function)
(external_function
name: _ @function)
(argument
name: _ @variable.parameter)
(named_argument
name: _ @variable.parameter)
(call
name: [
(name)
(constant)
] @function)
(field) @variable.member

View File

@ -0,0 +1,41 @@
[
(arguments)
(array)
(assign_field)
(assign_local)
(assign_receiver_field)
(binary)
(block)
(bounds)
(call)
(cast)
(class)
(class_pattern)
(compound_assign_field)
(compound_assign_local)
(compound_assign_receiver_field)
(define_constant)
(define_variable)
(grouped_expression)
(implement_trait)
(match)
(or_pattern)
(reopen_class)
(replace_field)
(replace_local)
(symbols)
(trait)
(tuple)
(tuple_pattern)
(type_arguments)
] @indent.begin
[
")"
"]"
"}"
] @indent.end @indent.branch
(line_comment) @indent.auto
(string) @indent.auto

View File

@ -0,0 +1,2 @@
((line_comment) @injection.content
(#set! injection.language "comment"))

View File

@ -0,0 +1,57 @@
[
(method)
(block)
] @local.scope
(method
name: _ @local.definition.method)
(external_function
name: _ @local.definition.function)
(argument
name: _ @local.definition.parameter)
(define_variable
name: _ @local.definition.var)
(define_constant
name: _ @local.definition.constant)
(define_field
name: _ @local.definition.field)
(named_argument
name: _ @local.definition.parameter)
(class
modifier: (modifier
"enum")
name: _ @local.definition.enum)
(class
modifier: (modifier
"enum")
body: (class_body
(define_case
name: _ @local.definition.field)))
(class
name: _ @local.definition.type)
(trait
name: _ @local.definition.type)
(import
(symbols
[
(identifier)
(constant)
(self)
] @local.definition.import))
(identifier) @local.reference
(field) @local.reference
(constant) @local.reference