forked from Mirrors/helix
Improve tree-sitter queries for vlang (#6279)
- Update hightlight - add indents - add textobject - add injectionspull/5/head
parent
64c137bd3d
commit
fb56a4bb75
@ -0,0 +1,17 @@
|
||||
[
|
||||
(struct_declaration)
|
||||
(function_declaration)
|
||||
(if_expression)
|
||||
(match_expression)
|
||||
(expression_case)
|
||||
(default_case)
|
||||
(for_statement)
|
||||
(unsafe_expression)
|
||||
(short_var_declaration)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"]"
|
||||
")"
|
||||
"}"
|
||||
] @outdent
|
@ -0,0 +1,6 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((sql_expression) @injection.content
|
||||
(#set! injection.language "sql"))
|
||||
|
@ -0,0 +1,27 @@
|
||||
(function_declaration
|
||||
body: (block)? @function.inside) @function.around
|
||||
|
||||
((function_declaration
|
||||
name: (identifier) @_name
|
||||
body: (block)? @test.inside) @test.around
|
||||
(#match? @_name "^test"))
|
||||
|
||||
(fn_literal
|
||||
body: (block)? @function.inside) @function.around
|
||||
|
||||
(parameter_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(call_expression
|
||||
(argument_list
|
||||
((_) @parameter.inside) @parameter.around))
|
||||
|
||||
(struct_declaration
|
||||
(struct_field_declaration_list) @class.inside) @class.around
|
||||
|
||||
(struct_field_declaration_list
|
||||
((_) @parameter.inside) @parameter.around)
|
||||
|
||||
(comment) @comment.inside
|
||||
(comment)+ @comment.around
|
||||
|
Loading…
Reference in New Issue