mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 04:10:06 -04:00
feat: add Odin
This commit is contained in:
parent
a67a4ab642
commit
40d373adcd
8 changed files with 379 additions and 0 deletions
39
queries/odin/locals.scm
Normal file
39
queries/odin/locals.scm
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
; Scopes
|
||||
|
||||
[
|
||||
(block)
|
||||
(declaration)
|
||||
(statement)
|
||||
] @scope
|
||||
|
||||
; References
|
||||
|
||||
(identifier) @reference
|
||||
|
||||
; Definitions
|
||||
|
||||
(package_declaration (identifier) @definition.namespace)
|
||||
|
||||
(import_declaration alias: (identifier) @definition.namespace)
|
||||
|
||||
(procedure_declaration (identifier) @definition.function)
|
||||
|
||||
(struct_declaration (identifier) @definition.type "::")
|
||||
|
||||
(enum_declaration (identifier) @definition.enum "::")
|
||||
|
||||
(union_declaration (identifier) @definition.type "::")
|
||||
|
||||
(variable_declaration (identifier) @definition.var ":=")
|
||||
|
||||
(const_declaration (identifier) @definition.constant "::")
|
||||
|
||||
(const_type_declaration (identifier) @definition.type ":")
|
||||
|
||||
(parameter (identifier) @definition.parameter ":"?)
|
||||
|
||||
(default_parameter (identifier) @definition.parameter ":=")
|
||||
|
||||
(field (identifier) @definition.field ":")
|
||||
|
||||
(label_statement (identifier) @definition ":")
|
||||
Loading…
Add table
Add a link
Reference in a new issue