fix(tiger): adjust invalid queries

This commit is contained in:
Bruno BELANYI 2022-06-14 20:01:12 +02:00 committed by Stephan Seitz
parent 6e3f888dc7
commit b8e3b03748
9 changed files with 41 additions and 36 deletions

View file

@ -16,9 +16,4 @@
(method_declaration)
] @fold
[
(comment)
(string_literal)
] @ignore
; vim: sw=2 foldmethod=marker

View file

@ -2,15 +2,21 @@
((function_call
function: (identifier) @function.builtin)
(#match? @function.builtin "^(chr|concat|exit|flush|getchar|not|ord|print|print_err|print_int|size|strcmp|streq|substring)$")
(#is-not? local))
; FIXME: not supported by neovim
; (#is-not? local)
)
((type_identifier) @type.builtin
(#match? @type.builtin "^(int|string|Object)$")
(#is-not? local))
; FIXME: not supported by neovim
; (#is-not? local)
)
((identifier) @variable.builtin
(#match? @variable.builtin "^self$")
(#is-not? local))
; FIXME: not supported by neovim
; (#is-not? local)
)
; }}}
; Keywords {{{
@ -24,15 +30,15 @@
"for"
"to"
"while"
] @keyword.repeat
] @repeat
[
"new"
] @keyword.constructor
] @constructor
[
"method"
] @keyword.method
] @method
[
"array"
@ -101,12 +107,12 @@
name: (identifier) @method)
(parameters
name: (identifier) @variable.parameter)
name: (identifier) @parameter)
; }}}
; Declarations {{{
(import_declaration
file: (string_literal) @string.special.path)
file: (string_literal) @string.special)
; }}}
; Literals {{{

View file

@ -9,27 +9,31 @@
(for_expression)
(let_expression)
(function_declaration)
] @local.scope
] @scope
; }}}
; Definitions {{{
(type_declaration
name: (identifier) @local.definition)
name: (identifier) @definition.type
(#set! "definition.var.scope" "parent"))
(parameters
name: (identifier) @local.definition)
name: (identifier) @definition.parameter)
(function_declaration
name: (identifier) @local.definition)
name: (identifier) @definition.function
(#set! "definition.var.scope" "parent"))
(primitive_declaration
name: (identifier) @local.definition)
name: (identifier) @definition.function
(#set! "definition.var.scope" "parent"))
(variable_declaration
name: (identifier) @local.definition)
name: (identifier) @definition.var
(#set! "definition.var.scope" "parent"))
; }}}
; References {{{
(identifier) @local.reference
(identifier) @reference
; }}}
; vim: sw=2 foldmethod=marker