Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
; Scopes

[
  (function_definition)
  (macro_definition)
] @local.scope

; `lambda`/`let`/`let*` are `special_form`s; the leading keyword is an anonymous
; token, so scope on the specific form rather than all special forms.
(special_form
  .
  ["lambda" "let" "let*"]) @local.scope

; Definitions

(function_definition
  parameters: (list (symbol) @local.definition.variable.parameter))
(macro_definition
  parameters: (list (symbol) @local.definition.variable.parameter))

; (lambda (a b) ...)
(special_form
  .
  "lambda"
  .
  (list (symbol) @local.definition.variable.parameter))

; (let ((x v) (y w)) ...) / let* — each binding's first symbol
(special_form
  .
  ["let" "let*"]
  .
  (list
    (list
      .
      (symbol) @local.definition.variable)))

; References

(symbol) @local.reference