Skip to content

Commit

Permalink
fix: pseudo scope_id workaround for the query capture issue
Browse files Browse the repository at this point in the history
  • Loading branch information
blindFS committed Dec 19, 2024
1 parent 473ce9f commit 0b6c0ed
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions languages/nu.scm
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,26 @@
;; new-line
(comment) @prepend_input_softline @append_hardline

;; TODO: pseudo scope_id to cope with
;; https://github.com/tree-sitter/tree-sitter/discussions/3967
(nu_script
(_) @append_begin_scope
.
(_) @prepend_end_scope @prepend_empty_scoped_softline
(_) @prepend_end_scope @prepend_input_softline
(#scope_id! "consecutive_scope")
)

(block
(_) @append_begin_scope
.
(_) @prepend_end_scope @prepend_empty_scoped_softline
(_) @prepend_end_scope @prepend_input_softline
(#scope_id! "consecutive_scope")
)

(val_closure
(_) @append_begin_scope
.
(_) @prepend_end_scope @prepend_empty_scoped_softline
(_) @prepend_end_scope @prepend_input_softline
(#scope_id! "consecutive_scope")
)

Expand Down

0 comments on commit 0b6c0ed

Please sign in to comment.