nvim-treesitter/queries/slint/locals.scm
Tobias Hunger 0f3183dda8
feat(slint)!: change to the official parser (#6027)
This change replaces the slint parser written and maintained by @jrmoulton
with the official one hosted in the slint-ui organization on github.

A huge thank you to @jrmoulton for all his work on the tree-sitter
parser!

---------

Co-authored-by: jrmoulton <jaredmoulton3@gmail.com>
2024-02-09 13:46:57 +00:00

117 lines
2 KiB
Scheme

[
(anon_struct_block)
(block)
(callback_event)
(component)
(enum_block)
(function_definition)
(global_definition)
(imperative_block)
(struct_block)
] @local.scope
(anon_struct_block
(_) @local.definition.field)
(argument) @local.definition.var
(callback
name: (_) @local.definition.member)
(component_definition
name: (_) @local.definition.type)
(enum_definition
name: (_) @local.definition.type)
(enum_block
(_) @local.definition.field)
(function_definition
name: (_) @local.definition.function)
(global_definition
name: (_) @local.definition.type)
(import_type
import_name: (_)
!local_name) @local.definition.import
(import_type
import_name: (_)
local_name: (_) @local.definition.import)
(property
name: (_) @local.definition.field)
(struct_block
(_) @local.definition.field)
(struct_definition
name: (_) @local.definition.type)
(typed_identifier
name: (_) @local.definition.var)
(argument
(_) @local.reference)
(binary_expression
left: (_) @local.reference)
(binary_expression
right: (_) @local.reference)
(callback_event
name: (_) @local.reference)
(component
type: (_) @local.reference
(#set! reference.kind "type"))
(component_definition
base_type: (_) @local.reference
(#set! reference.kind "type"))
(function_call
name: (_) @local.reference)
(index_op
index: (_) @local.reference)
(index_op
left: (_) @local.reference)
(member_access
base: (_) @local.reference)
(member_access
member: (_) @local.reference)
(parens_op
left: (_) @local.reference)
(property
type: (_) @local.reference
(#set! reference.kind "type"))
(property_assignment
property: (_) @local.reference
(#set! reference.kind "field"))
(property_assignment
value: (_) @local.reference)
(struct_block
(_) @local.reference
(#set! reference.kind "type"))
(tr
percent: (_) @local.reference)
(typed_identifier
type: (_) @local.reference
(#set! reference.kind "type"))
(unary_expression
left: (_) @local.reference)