mirror of
https://github.com/helix-editor/helix
synced 2026-11-24 15:24:39 +01:00
Switch from '#match?' to '#any-of?' for alternations. Treat 'nominal's the same as types/opaques.
26 lines
894 B
Scheme
26 lines
894 B
Scheme
; Specs and Callbacks
|
|
(attribute
|
|
(stab_clause
|
|
pattern: (arguments (variable)? @local.definition.variable.parameter)
|
|
; If a spec uses a variable as the return type (and later a `when` clause to type it):
|
|
body: (variable)? @local.definition.variable.parameter)) @local.scope
|
|
|
|
; parametric `-type`s
|
|
((attribute
|
|
name: (atom) @keyword
|
|
(arguments
|
|
(binary_operator
|
|
left: (call (arguments (variable) @local.definition.variable.parameter))
|
|
operator: "::") @local.scope))
|
|
(#any-of? @keyword "type" "opaque" "nominal"))
|
|
|
|
; `fun`s
|
|
(anonymous_function (stab_clause pattern: (arguments (variable) @local.definition.variable.parameter))) @local.scope
|
|
|
|
; Ordinary functions
|
|
((function_clause
|
|
pattern: (arguments (variable) @local.definition.variable.parameter)) @local.scope
|
|
(#not-match? @local.definition.variable.parameter "^_"))
|
|
|
|
(variable) @local.reference
|