Skip to content

Commit

Permalink
Enhance air format (#86)
Browse files Browse the repository at this point in the history
* Add `Parse<RRoot>` utility struct

* Style changes in latest version

* Add multi-file and directory support, add `--check`

* Wrap `ParseDiagnostic` in our `ParseError`

* Clean up a bit with thiserror!

* Add `relativize_path()`

* Add a comment about tracing

* Remove `air_workspace` for now for simplicity

LSP needs `format_node()` since it holds onto the AST, so this isn't as useful yet over there

* Add `is_changed()` for ergonomics

* Remove outdated comment

* Use `u8::MAX` as our catch all error code

For the "something has gone wrong" unexpected error case

* Various tweaks from code review with @lionel-

* Add a TODO to use user supplied line endings in the LSP

* Add a TODO about not normalizing line endings in the cli

* air_fs -> fs

* Ah clippy
  • Loading branch information
DavisVaughan authored Dec 10, 2024
1 parent b569713 commit 68554e4
Show file tree
Hide file tree
Showing 16 changed files with 660 additions and 99 deletions.
124 changes: 94 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ air_r_formatter = { path = "./crates/air_r_formatter" }
air_r_parser = { path = "./crates/air_r_parser" }
air_r_syntax = { path = "./crates/air_r_syntax" }
biome_ungrammar = { path = "./crates/biome_ungrammar" }
fs = { path = "./crates/fs" }
line_ending = { path = "./crates/line_ending" }
lsp = { path = "./crates/lsp" }
lsp_test = { path = "./crates/lsp_test" }
Expand All @@ -50,15 +51,18 @@ dissimilar = "1.0.9"
futures = "0.3.31"
futures-util = "0.3.31"
httparse = "1.9.5"
ignore = "0.4.23"
insta = "1.40.0"
itertools = "0.13.0"
line-index = "0.1.2"
log = "0.4.22"
memchr = "2.7.4"
path-absolutize = "3.1.1"
proc-macro2 = "1.0.86"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.132"
struct-field-names-as-array = "0.3.0"
thiserror = "2.0.5"
tokio = { version = "1.41.1" }
tokio-util = "0.7.12"
# For https://github.com/ebkalderon/tower-lsp/pull/428
Expand Down
Loading

0 comments on commit 68554e4

Please sign in to comment.