Skip to content

Commit

Permalink
Change helix to not use more specific captures in locals
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Mar 22, 2024
1 parent 348e9cf commit 989c1aa
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions build-flavored-queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@
(r"@keyword.module", r"@keyword.directive"),
(r"@function.call", r"@function"),
(r"@spell ?", r""),
# nothing more specific than reference
(r"(@local.reference)[\w.]+", r"\1"),
# nothing more specific than `@local.(reference,definition)`
(r"(@local\.\w+)\.[.\w]+", r"\1"),
]

# Documentation not yet complete
Expand Down
10 changes: 5 additions & 5 deletions queries-flavored/helix/locals.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
; Definitions

(alias
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(assignment
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(module
name: (identifier) @local.definition.namespace)
name: (identifier) @local.definition)

(parameter
name: (identifier) @local.definition.variable)
name: (identifier) @local.definition)

(recipe_header
name: (identifier) @local.definition.function)
name: (identifier) @local.definition)

; References

Expand Down
10 changes: 5 additions & 5 deletions queries-flavored/lapce/locals.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
; Definitions

(alias
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(assignment
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(module
name: (identifier) @local.definition.namespace)
name: (identifier) @local.definition)

(parameter
name: (identifier) @local.definition.variable)
name: (identifier) @local.definition)

(recipe_header
name: (identifier) @local.definition.function)
name: (identifier) @local.definition)

; References

Expand Down
10 changes: 5 additions & 5 deletions queries-flavored/zed/locals.scm
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
; Definitions

(alias
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(assignment
left: (identifier) @local.definition.variable)
left: (identifier) @local.definition)

(module
name: (identifier) @local.definition.namespace)
name: (identifier) @local.definition)

(parameter
name: (identifier) @local.definition.variable)
name: (identifier) @local.definition)

(recipe_header
name: (identifier) @local.definition.function)
name: (identifier) @local.definition)

; References

Expand Down

0 comments on commit 989c1aa

Please sign in to comment.