mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-07 00:07:29 +00:00
21 lines
450 B
Scheme
21 lines
450 B
Scheme
; Adapted from nvim-treesitter queries/haskell/locals.scm (Apache-2.0):
|
|
; captures the bound names (not whole declarations) and adds scopes.
|
|
|
|
(function
|
|
name: (variable) @local.definition.function
|
|
(#set! definition.function.scope "parent"))
|
|
|
|
(bind
|
|
name: (variable) @local.definition.var)
|
|
|
|
(pattern/variable) @local.definition.parameter
|
|
|
|
(expression/variable) @local.reference
|
|
|
|
[
|
|
(function)
|
|
(lambda)
|
|
(let_in)
|
|
(alternative)
|
|
] @local.scope
|