1

Update generated neovim config

This commit is contained in:
2024-08-15 14:28:54 +02:00
parent 07409c223d
commit 25cfcf2941
3809 changed files with 351157 additions and 0 deletions

View File

@ -0,0 +1,241 @@
; highlights.scm
;
; Highlighting queries for D code for use by Tree-Sitter.
;
; Copyright 2023 Garrett D'Amore
;
; Distributed under the MIT License.
; (See accompanying file LICENSE.txt or https://opensource.org/licenses/MIT)
; SPDX-License-Identifier: MIT
; these are listed first, because they override keyword queries
(identity_expression (in) @operator)
(identity_expression (is) @operator)
(storage_class) @keyword.storage
(function_declaration (identifier) @function)
(call_expression (identifier) @function)
(call_expression (type (identifier) @function))
(module_fqn) @namespace
[
(abstract)
(alias)
(align)
(asm)
(assert)
(auto)
(cast)
(const)
(debug)
(delete)
(deprecated)
(export)
(extern)
(final)
(immutable)
(in)
(inout)
(invariant)
(is)
(lazy)
; "macro" - obsolete
(mixin)
(module)
(new)
(nothrow)
(out)
(override)
(package)
(pragma)
(private)
(protected)
(public)
(pure)
(ref)
(scope)
(shared)
(static)
(super)
(synchronized)
(template)
(this)
(throw)
(typeid)
(typeof)
(unittest)
(version)
(with)
(gshared)
(traits)
(vector)
(parameters_)
] @keyword
[
(class)
(struct)
(interface)
(union)
(enum)
(function)
(delegate)
] @keyword.storage.type
[
(break)
(case)
(catch)
(continue)
(do)
(default)
(finally)
(else)
(goto)
(if)
(switch)
(try)
] @keyword.control
(return) @keyword.control.return
(import) @keyword.control.import
[
(for)
(foreach)
(foreach_reverse)
(while)
] @keyword.control.repeat
[
(not_in)
(not_is)
"/="
"/"
".."
"..."
"&"
"&="
"&&"
"|"
"|="
"||"
"-"
"-="
"--"
"+"
"+="
"++"
"<"
"<="
"<<"
"<<="
">"
">="
">>="
">>>="
">>"
">>>"
"!"
"!="
"?"
"$"
"="
"=="
"*"
"*="
"%"
"%="
"^"
"^="
"^^"
"^^="
"~"
"~="
"@"
"=>"
] @operator
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket
[
";"
"."
":"
","
] @punctuation.delimiter
[
(true)
(false)
] @constant.builtin.boolean
(null) @constant.builtin
(special_keyword) @constant.builtin
(directive) @keyword.directive
(shebang) @keyword.directive
(comment) @comment
[
(void)
(bool)
(byte)
(ubyte)
(char)
(short)
(ushort)
(wchar)
(dchar)
(int)
(uint)
(long)
(ulong)
(real)
(double)
(float)
(size_t)
(ptrdiff_t)
(string)
(cstring)
(dstring)
(wstring)
(noreturn)
] @type.builtin
[
(cent)
(ucent)
(ireal)
(idouble)
(ifloat)
(creal)
(double)
(cfloat)
] @warning ; these types are deprecated
(label (identifier) @label)
(goto_statement (goto) @keyword (identifier) @label)
(string_literal) @string
(int_literal) @constant.numeric.integer
(float_literal) @constant.numeric.float
(char_literal) @constant.character
(identifier) @variable
(at_attribute) @attribute
; everything after __EOF_ is plain text
(end_file) @ui.text

View File

@ -0,0 +1,17 @@
[
(parameters)
(template_parameters)
(expression_statement)
(aggregate_body)
(function_body)
(scope_statement)
(block_statement)
(case_statement)
] @indent
[
(case)
(default)
"}"
"]"
] @outdent

View File

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

View File

@ -0,0 +1,9 @@
(function_declaration (function_body) @function.inside) @function.around
(comment) @comment.inside
(comment)+ @comment.around
(class_declaration (aggregate_body) @class.inside) @class.around
(interface_declaration (aggregate_body) @class.inside) @class.around
(struct_declaration (aggregate_body) @class.inside) @class.around
(unittest_declaration (block_statement) @test.insid) @test.around
(parameter) @parameter.inside
(template_parameter) @parameter.inside

View File

@ -0,0 +1,255 @@
; highlights.scm
;
; Highlighting queries for D code for use by Tree-Sitter.
;
; Copyright 2023 Garrett D'Amore
;
; Distributed under the MIT License.
; (See accompanying file LICENSE.txt or https://opensource.org/licenses/MIT)
; SPDX-License-Identifier: MIT
(string_literal) @string
(int_literal) @number
(float_literal) @number
(char_literal) @number
(identifier) @variable
(at_attribute) @property
[
(lazy)
(align)
(extern)
(static)
(abstract)
(final)
(override)
(synchronized)
(auto)
(scope)
(gshared)
(ref)
(deprecated)
(nothrow)
(pure)
(type_ctor)
] @keyword.storage
(parameter_attribute (return) @keyword.storage)
(parameter_attribute (in) @keyword.storage)
(parameter_attribute (out) @keyword.storage)
(function_declaration (identifier) @function)
(call_expression (identifier) @function)
(call_expression (type (identifier) @function))
(named_argument (identifier) @variable.parameter)
[
(abstract)
(alias)
(align)
(asm)
(assert)
(auto)
(cast)
(class)
(const)
(debug)
(delegate)
(delete)
(deprecated)
(enum)
(export)
(extern)
(final)
(function)
(immutable)
(import)
(in)
(inout)
(interface)
(invariant)
(is)
(lazy)
; "macro" - obsolete
(mixin)
(module)
(new)
(nothrow)
(out)
(override)
(package)
(pragma)
(private)
(protected)
(public)
(pure)
(ref)
(scope)
(shared)
(static)
(struct)
(super)
(synchronized)
(template)
(this)
(throw)
(typeid)
(typeof)
(union)
(unittest)
(version)
(with)
(gshared)
(traits)
(vector)
(parameters_)
] @keyword
[
(break)
(case)
(catch)
(continue)
(do)
(default)
(finally)
(else)
(for)
(foreach)
(foreach_reverse)
(goto)
(if)
(switch)
(try)
(return)
(while)
] @keyword.control
[
(not_in)
(not_is)
"/="
"/"
".."
"..."
"&"
"&="
"&&"
"|"
"|="
"||"
"-"
"-="
"--"
"+"
"+="
"++"
"<"
"<="
"<<"
"<<="
">"
">="
">>="
">>>="
">>"
">>>"
"!"
"!="
"?"
"$"
"="
"=="
"*"
"*="
"%"
"%="
"^"
"^="
"^^"
"^^="
"~"
"~="
"@"
"=>"
] @operator
[
";"
"."
":"
","
] @punctuation.delimiter
[
"("
")"
"["
"["
"{"
"}"
] @punctuation.bracket
[
(null)
(true)
(false)
] @constant.language
(special_keyword) @constant.language
(directive) @keyword.directive
(shebang) @keyword.directive
(comment) @comment
[
(void)
(bool)
(byte)
(ubyte)
(char)
(short)
(ushort)
(wchar)
(dchar)
(int)
(uint)
(long)
(ulong)
(real)
(double)
(float)
(size_t)
(ptrdiff_t)
(string)
(cstring)
(wstring)
(noreturn)
] @type.builtin
[
(cent)
(ucent)
(ireal)
(idouble)
(ifloat)
(creal)
(double)
(cfloat)
] @type.deprecated
(label (identifier) @label)
(goto_statement (goto) @keyword.control (identifier) @label)
; this covers other cases where the identifier can only
; be a type (such as in an is-expression on a constraint)
(type (identifier) @type)
; these are listed last, because they override keyword queries
(identity_expression (in) @operator)
(identity_expression (is) @operator)
; everything after __EOF_ is plain text
(end_file) @text

View File

@ -0,0 +1,17 @@
[
(parameters)
(template_parameters)
(expression_statement)
(aggregate_body)
(function_body)
(scope_statement)
(block_statement)
(case_statement)
] @indent
[
(case)
(default)
"}"
"]"
] @outdent

View File

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

View File

@ -0,0 +1,6 @@
(struct_declaration (aggregate_body (#set! role type)) @subtree)
(class_declaration (aggregate_body (#set! role type)) @subtree)
(union_declaration (aggregate_body (#set! role type)) @subtree)
(interface_declaration (aggregate_body (#set! role type)) @subtree)
(block_statement (#set! role block)) @subtree

View File

@ -0,0 +1,283 @@
;
; These are the highlight queries used by the
; Nova editor (as of version 10).
;
; all forms of comment
(comment) @comment
; line directive
(directive) @processing
(shebang) @processing
(null) @value.null
[
(true)
(false)
] @value.boolean
[
(this)
(super)
] @keyword.self
(int_literal) @value.number
(float_literal) @value.number
(char_literal) @value.number ; not sure what is best for this
(special_keyword) @value.symbols
(htmlentity) @value.entity
(escape_sequence) @value.entity
[
"("
")"
"["
"]"
"{"
"}"
] @bracket
[
(not_in)
(not_is)
] @keyword.operator
[
(lazy)
(align)
(extern)
(static)
(abstract)
(final)
(override)
(synchronized)
(auto)
(scope)
(gshared)
(ref)
(deprecated)
(nothrow)
(pure)
(type_ctor)
] @keyword.modifier
; these are special only when it shows up here
(parameter_attribute (return) @keyword.modifier)
(parameter_attribute (in) @keyword.modifier)
(parameter_attribute (out) @keyword.modifier)
(function_declaration (identifier) @identifier.function)
(call_expression (type (identifier) @identifier.function))
(template_instance (identifier) @identifier.method)
[
"/="
"/"
".."
"..."
"&"
"&="
"&&"
"|"
"|="
"||"
"-"
"-="
"--"
"+"
"+="
"++"
"<"
"<="
"<<"
"<<="
">"
">="
">>="
">>>="
">>"
">>>"
"!"
"!="
"?"
"$"
"="
"=="
"*"
"*="
"%"
"%="
"^"
"^="
"^^"
"^^="
"~"
"~="
"@"
"=>"
] @operator
[
(break)
(case)
(catch)
(continue)
(do)
(default)
(finally)
(else)
(goto)
(if)
(switch)
(try)
] @keyword.control
; builtin types. it would be nice to have a different markup for it.
[
(void)
(bool)
(byte)
(ubyte)
(char)
(short)
(ushort)
(wchar)
(dchar)
(int)
(uint)
(long)
(ulong)
(real)
(double)
(float)
(size_t)
(ptrdiff_t)
(string)
(cstring)
(dstring)
(wstring)
(noreturn)
] @identifier.type.core
[
(class)
(struct)
(interface)
(union)
(enum)
(function)
(delegate)
] @keyword.construct
; some editors (Helix) have a different selector for return statements.
; TODO: this keyword is sometimes a parameter attribute
(return) @keyword.control
; some editors (Helix) have a selector for imports
(import) @keyword.control
; some editors have a repeat keyword construct
[
(for)
(foreach)
(foreach_reverse)
(while)
] @keyword.control
(cast) @keyword.operator
[
(abstract)
(alias)
(align)
(asm)
(assert)
(auto)
(cast)
(debug)
(delete)
(deprecated)
(export)
(extern)
(final)
(invariant)
(is)
; "macro" - obsolete
(mixin)
(module)
(new)
(override)
(pragma)
(scope)
(synchronized)
(template)
(throw)
(typeid)
(typeof)
(unittest)
(version)
(with)
(traits)
(vector)
(parameters_)
] @keyword
[
(this)
(super)
] @keyword.self
[
(const)
(immutable)
(in)
(inout)
(lazy)
(ref)
(protected)
(private)
(package)
(public)
(pure)
(gshared)
(shared)
(static)
] @keyword.modifier
[
(cent)
(ucent)
(ireal)
(idouble)
(ifloat)
(creal)
(cdouble)
(cfloat)
] @invalid ; these types are deprecated
(debug_condition (debug) (int_literal) @invalid) ; deprecated in 2.101
(debug_specification (debug) (int_literal) @invalid) ; deprecated in 2.101
(version_condition (version) (int_literal) @invalid) ; deprecated in 2.101
(version_specification (version) (int_literal) @invalid) ; deprecated in 2.101
(version_condition (identifier) @value.symbol)
(module_fqn) @processing ; this is a crummy workaround since we don't have anything for imports
(module_declaration (module_fqn)) @definition.package
(class_declaration (identifier) @identifier.type.class)
(struct_declaration (identifier) @identifier.type.struct)
(interface_declaration (identifier) @identifier.type.protocol)
(at_attribute) @identifier.property
; conventional naming
(type (identifier) @_type (#match? @_type "^[A-Z]")) @identifier.type.class
(type (identifier) @_type (#not-match? @_type "^[A-Z]")) @identifier.type
(enum_declaration (enum) . (identifier) @identifier.type.enum)
(auto_declaration (storage_class (auto)) . (identifier) @identifier.variable)
(manifest_declarator . (identifier) @identifier.constant)
(identifier) @identifier ; catch all
(declarator . (identifier) @identifier.variable)
(declarator "=" (void) @value.null)
((enum_member . (identifier) @identifier.property) (#set! role enum-member))
(interpolation_expression "$(" @bracket)
(interpolation_expression) @string-template.value
(string_literal) @string

View File

@ -0,0 +1,23 @@
((module_def (module_declaration (module_fqn) @name)) @subtree (#set! role package))
((struct_declaration (struct) . (identifier) @name) @subtree (#set! role struct))
((enum_declaration (enum) . (identifier) @name) @subtree (#set! role enum))
((class_declaration (class) . (identifier) @name) @subtree (#set! role class))
((constructor (this) @name) @subtree (#set! role constructor))
((destructor (this) @name) @subtree (#set! role destructor))
((postblit (this) @name) @subtree (#set! role constructor))
((manifest_declarator . (identifier) @name) @subtree (#set! role constant))
((function_declaration (identifier) @name) @subtree (#set! role function-or-method))
((aggregate_body (variable_declaration (declarator (identifier) @name) @subtree (#set! role property))))
((union_declaration (union) . (identifier) @name) @subtree (#set! role union))
((alias_declaration (alias_initializer . (identifier) @name) @subtree (#set! role type)))
((anonymous_enum_declaration ((enum_member . (identifier) @name) @subtree (#set! role constant))))
((enum_declaration ((enum_member . (identifier) @name) @subtree (#set! role enum-member))))

View File

@ -0,0 +1,9 @@
(function_declaration (function_body) @function.inside) @function.around
(comment) @comment.inside
(comment)+ @comment.around
(class_declaration (aggregate_body) @class.inside) @class.around
(interface_declaration (aggregate_body) @class.inside) @class.around
(struct_declaration (aggregate_body) @class.inside) @class.around
(unittest_declaration (block_statement) @test.inside) @test.around
(parameter) @parameter.inside
(template_parameter) @parameter.inside