Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adapted to the latest parser #5

Merged
merged 2 commits into from
Dec 15, 2024
Merged

feat: adapted to the latest parser #5

merged 2 commits into from
Dec 15, 2024

Conversation

blindFS
Copy link
Owner

@blindFS blindFS commented Dec 15, 2024

This PR adapted the formatter to be compatible with the latest tree-sitter-nu parser.

It contains a hack solution for the inconsistent behavior of assignment that should be fixed in the future.

image image
;; FIXME: temp workaround for the whitespace issue
[
  ":"
  ";"
  "do"
  "if"
  "match"
  "try"
  "while"
] @append_space

[
  "="
  (match_guard)
] @prepend_space

(assignment
  opr: _
  rhs: (pipeline
    (pipe_element
      (val_string
        (raw_string_begin)
      )
    )
  ) @prepend_space
)

(
  "="
  .
  (pipeline
    (pipe_element
      (val_string
        (raw_string_begin)
      )
    )
  ) @prepend_space
)

@blindFS blindFS merged commit 6f0657d into main Dec 15, 2024
1 check passed
@blindFS blindFS deleted the dev branch December 15, 2024 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant