Regenerate nvim config
This commit is contained in:
33
config/neovim/store/nvim-treesitter/queries/pony/folds.scm
Normal file
33
config/neovim/store/nvim-treesitter/queries/pony/folds.scm
Normal file
@ -0,0 +1,33 @@
|
||||
[
|
||||
(use_statement)
|
||||
(actor_definition)
|
||||
(class_definition)
|
||||
(primitive_definition)
|
||||
(interface_definition)
|
||||
(trait_definition)
|
||||
(struct_definition)
|
||||
(constructor)
|
||||
(method)
|
||||
(behavior)
|
||||
(parameters)
|
||||
(type)
|
||||
(if_statement)
|
||||
(iftype_statement)
|
||||
(elseif_block)
|
||||
(elseiftype_block)
|
||||
(else_block)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(try_statement)
|
||||
(with_statement)
|
||||
(repeat_statement)
|
||||
(recover_statement)
|
||||
(match_statement)
|
||||
(case_statement)
|
||||
(parenthesized_expression)
|
||||
(tuple_expression)
|
||||
(array_literal)
|
||||
(object_literal)
|
||||
(string)
|
||||
(block_comment)
|
||||
] @fold
|
||||
333
config/neovim/store/nvim-treesitter/queries/pony/highlights.scm
Normal file
333
config/neovim/store/nvim-treesitter/queries/pony/highlights.scm
Normal file
@ -0,0 +1,333 @@
|
||||
; Includes
|
||||
"use" @keyword.import
|
||||
|
||||
; Keywords
|
||||
[
|
||||
"primitive"
|
||||
"embed"
|
||||
"let"
|
||||
"var"
|
||||
(compile_intrinsic)
|
||||
"as"
|
||||
"consume"
|
||||
"recover"
|
||||
"object"
|
||||
"where"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"class"
|
||||
"struct"
|
||||
"type"
|
||||
"interface"
|
||||
"trait"
|
||||
"actor"
|
||||
] @keyword.type
|
||||
|
||||
"fun" @keyword.function
|
||||
|
||||
"be" @keyword.coroutine
|
||||
|
||||
[
|
||||
"in"
|
||||
"is"
|
||||
] @keyword.operator
|
||||
|
||||
"return" @keyword.return
|
||||
|
||||
; Qualifiers
|
||||
[
|
||||
"iso"
|
||||
"trn"
|
||||
"ref"
|
||||
"val"
|
||||
"box"
|
||||
"tag"
|
||||
"#read"
|
||||
"#send"
|
||||
"#share"
|
||||
"#alias"
|
||||
"#any"
|
||||
] @keyword.modifier
|
||||
|
||||
; Conditionals
|
||||
[
|
||||
"if"
|
||||
"ifdef"
|
||||
"iftype"
|
||||
"then"
|
||||
"else"
|
||||
"elseif"
|
||||
"match"
|
||||
] @keyword.conditional
|
||||
|
||||
(if_statement
|
||||
"end" @keyword.conditional)
|
||||
|
||||
(iftype_statement
|
||||
"end" @keyword.conditional)
|
||||
|
||||
(match_statement
|
||||
"end" @keyword.conditional)
|
||||
|
||||
; Repeats
|
||||
[
|
||||
"repeat"
|
||||
"until"
|
||||
"while"
|
||||
"for"
|
||||
"continue"
|
||||
"do"
|
||||
"break"
|
||||
] @keyword.repeat
|
||||
|
||||
(do_block
|
||||
"end" @keyword.repeat)
|
||||
|
||||
(repeat_statement
|
||||
"end" @keyword.repeat)
|
||||
|
||||
; Exceptions
|
||||
[
|
||||
"try"
|
||||
(error)
|
||||
"compile_error"
|
||||
] @keyword.exception
|
||||
|
||||
(try_statement
|
||||
"end" @keyword.exception)
|
||||
|
||||
(recover_statement
|
||||
"end" @keyword.exception)
|
||||
|
||||
; Attributes
|
||||
(annotation) @attribute
|
||||
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
(this) @variable.builtin
|
||||
|
||||
; Fields
|
||||
(field
|
||||
name: (identifier) @variable.member)
|
||||
|
||||
(member_expression
|
||||
"."
|
||||
(identifier) @variable.member)
|
||||
|
||||
; Constructors
|
||||
(constructor
|
||||
"new" @keyword.operator
|
||||
(identifier) @constructor)
|
||||
|
||||
; Methods
|
||||
(method
|
||||
(identifier) @function.method)
|
||||
|
||||
(behavior
|
||||
(identifier) @function.method)
|
||||
|
||||
(ffi_method
|
||||
(identifier) @function.method)
|
||||
|
||||
((ffi_method
|
||||
(string) @string.special)
|
||||
(#set! "priority" 105))
|
||||
|
||||
(call_expression
|
||||
callee: [
|
||||
(identifier) @function.method.call
|
||||
(ffi_identifier
|
||||
(identifier) @function.method.call)
|
||||
(member_expression
|
||||
"."
|
||||
(identifier) @function.method.call)
|
||||
])
|
||||
|
||||
; Parameters
|
||||
(parameter
|
||||
name: (identifier) @variable.parameter)
|
||||
|
||||
(lambda_parameter
|
||||
name: (identifier) @variable.parameter)
|
||||
|
||||
; Types
|
||||
(type_alias
|
||||
(identifier) @type.definition)
|
||||
|
||||
(base_type
|
||||
name: (identifier) @type)
|
||||
|
||||
(generic_parameter
|
||||
(identifier) @type)
|
||||
|
||||
(lambda_type
|
||||
(identifier)? @function.method)
|
||||
|
||||
((identifier) @type
|
||||
(#lua-match? @type "^_*[A-Z][a-zA-Z0-9_]*$"))
|
||||
|
||||
; Operators
|
||||
(unary_expression
|
||||
operator: [
|
||||
"not"
|
||||
"addressof"
|
||||
"digestof"
|
||||
] @keyword.operator)
|
||||
|
||||
(binary_expression
|
||||
operator: [
|
||||
"and"
|
||||
"or"
|
||||
"xor"
|
||||
"is"
|
||||
"isnt"
|
||||
] @keyword.operator)
|
||||
|
||||
[
|
||||
"="
|
||||
"?"
|
||||
"|"
|
||||
"&"
|
||||
"-~"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"%%"
|
||||
"<<"
|
||||
">>"
|
||||
"=="
|
||||
"!="
|
||||
">"
|
||||
">="
|
||||
"<="
|
||||
"<"
|
||||
"+~"
|
||||
"-~"
|
||||
"*~"
|
||||
"/~"
|
||||
"%~"
|
||||
"%%~"
|
||||
"<<~"
|
||||
">>~"
|
||||
"==~"
|
||||
"!=~"
|
||||
">~"
|
||||
">=~"
|
||||
"<=~"
|
||||
"<~"
|
||||
"+?"
|
||||
"-?"
|
||||
"*?"
|
||||
"/?"
|
||||
"%?"
|
||||
"%%?"
|
||||
"<:"
|
||||
] @operator
|
||||
|
||||
; Literals
|
||||
(string) @string
|
||||
|
||||
(source_file
|
||||
(string) @string.documentation)
|
||||
|
||||
(actor_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(class_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(primitive_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(interface_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(trait_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(struct_definition
|
||||
(string) @string.documentation)
|
||||
|
||||
(type_alias
|
||||
(string) @string.documentation)
|
||||
|
||||
(field
|
||||
(string) @string.documentation)
|
||||
|
||||
(constructor
|
||||
[
|
||||
(string) @string.documentation
|
||||
(block
|
||||
.
|
||||
(string) @string.documentation)
|
||||
])
|
||||
|
||||
(method
|
||||
[
|
||||
(string) @string.documentation
|
||||
(block
|
||||
.
|
||||
(string) @string.documentation)
|
||||
])
|
||||
|
||||
(behavior
|
||||
[
|
||||
(string) @string.documentation
|
||||
(block
|
||||
.
|
||||
(string) @string.documentation)
|
||||
])
|
||||
|
||||
(character) @character
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(number) @number
|
||||
|
||||
(float) @number.float
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
; Punctuation
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
";"
|
||||
":"
|
||||
"~"
|
||||
".>"
|
||||
"->"
|
||||
"=>"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"@"
|
||||
"!"
|
||||
"^"
|
||||
"..."
|
||||
] @punctuation.special
|
||||
|
||||
; Comments
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
71
config/neovim/store/nvim-treesitter/queries/pony/indents.scm
Normal file
71
config/neovim/store/nvim-treesitter/queries/pony/indents.scm
Normal file
@ -0,0 +1,71 @@
|
||||
[
|
||||
(use_statement)
|
||||
(actor_definition)
|
||||
(class_definition)
|
||||
(primitive_definition)
|
||||
(interface_definition)
|
||||
(trait_definition)
|
||||
(struct_definition)
|
||||
(constructor)
|
||||
(method)
|
||||
(behavior)
|
||||
(parameters)
|
||||
(if_block)
|
||||
(then_block)
|
||||
(elseif_block)
|
||||
(else_block)
|
||||
(iftype_statement)
|
||||
(elseiftype_block)
|
||||
(do_block)
|
||||
(match_statement)
|
||||
(parenthesized_expression)
|
||||
(tuple_expression)
|
||||
(array_literal)
|
||||
(object_literal)
|
||||
] @indent.begin
|
||||
|
||||
(try_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
(repeat_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
(recover_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
(return_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
(continue_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
(break_statement
|
||||
(block) @indent.begin)
|
||||
|
||||
[
|
||||
"}"
|
||||
"]"
|
||||
")"
|
||||
] @indent.end
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
] @indent.branch
|
||||
|
||||
[
|
||||
(ERROR)
|
||||
(string)
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @indent.auto
|
||||
@ -0,0 +1,5 @@
|
||||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
86
config/neovim/store/nvim-treesitter/queries/pony/locals.scm
Normal file
86
config/neovim/store/nvim-treesitter/queries/pony/locals.scm
Normal file
@ -0,0 +1,86 @@
|
||||
; Scopes
|
||||
[
|
||||
(use_statement)
|
||||
(actor_definition)
|
||||
(class_definition)
|
||||
(primitive_definition)
|
||||
(interface_definition)
|
||||
(trait_definition)
|
||||
(struct_definition)
|
||||
(constructor)
|
||||
(method)
|
||||
(behavior)
|
||||
(if_statement)
|
||||
(iftype_statement)
|
||||
(elseif_block)
|
||||
(elseiftype_block)
|
||||
(else_block)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(try_statement)
|
||||
(with_statement)
|
||||
(repeat_statement)
|
||||
(recover_statement)
|
||||
(match_statement)
|
||||
(case_statement)
|
||||
(parenthesized_expression)
|
||||
(tuple_expression)
|
||||
(array_literal)
|
||||
(object_literal)
|
||||
] @local.scope
|
||||
|
||||
; References
|
||||
(identifier) @local.reference
|
||||
|
||||
; Definitions
|
||||
(field
|
||||
name: (identifier) @local.definition.field)
|
||||
|
||||
(use_statement
|
||||
(identifier) @local.definition.import)
|
||||
|
||||
(constructor
|
||||
(identifier) @local.definition.method)
|
||||
|
||||
(method
|
||||
(identifier) @local.definition.method)
|
||||
|
||||
(behavior
|
||||
(identifier) @local.definition.method)
|
||||
|
||||
(actor_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(type_alias
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(class_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(primitive_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(interface_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(trait_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(struct_definition
|
||||
(identifier) @local.definition.type)
|
||||
|
||||
(parameter
|
||||
name: (identifier) @local.definition.parameter)
|
||||
|
||||
(variable_declaration
|
||||
(identifier) @local.definition.var)
|
||||
|
||||
(for_statement
|
||||
[
|
||||
(identifier) @local.definition.var
|
||||
(tuple_expression
|
||||
(identifier) @local.definition.var)
|
||||
])
|
||||
|
||||
(with_elem
|
||||
(identifier) @local.definition.var)
|
||||
Reference in New Issue
Block a user