mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Go locals: Make func_literal (lambda) a @scope
This commit is contained in:
parent
17f99676e1
commit
5b8c110ea4
1 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,6 @@
|
|||
(#strip! @definition.doc "^//\\s*") ; <- does nothing at the moment
|
||||
)
|
||||
|
||||
|
||||
(short_var_declaration
|
||||
left: (expression_list
|
||||
(identifier) @definition.var))
|
||||
|
|
@ -36,6 +35,8 @@
|
|||
(identifier) @reference
|
||||
(type_identifier) @reference
|
||||
(field_identifier) @reference
|
||||
((package_identifier) @reference
|
||||
(set! reference.kind "namespace"))
|
||||
|
||||
(package_clause
|
||||
(package_identifier) @definition.namespace)
|
||||
|
|
@ -64,6 +65,7 @@
|
|||
|
||||
;; Scopes
|
||||
|
||||
(func_literal) @scope
|
||||
(source_file) @scope
|
||||
(function_declaration) @scope
|
||||
(if_statement) @scope
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue