-
Notifications
You must be signed in to change notification settings - Fork 135
Add ocamlformat-mlx for .mlx files #1528
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
base: master
Are you sure you want to change the base?
Conversation
(* TODO: Unsure about this, keeping it empty for now *) | ||
| Mlx -> | ||
(match kind with | ||
| Intf -> [ re; ml; mly; mll ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Intf -> [ re; ml; mly; mll ] | |
| Intf -> [ re; ml; mly; mll; mlx ] |
as we want to be able to switch to .mlx from .mli if it is present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But here we are matching on an "Mlx Intf", which is not an mli
file, right ? I am not sure that case happens at all. But nothing really bad could happen from having too many of such rules...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at the surrounding code, I thought the kind
belongs to the origin, so we are on interface file and want to switch to the implementation, which can be .re, .ml, .mly, mll, and now .mlx
@@ -436,13 +440,18 @@ let get_impl_intf_counterparts m uri = | |||
in | |||
match Syntax.of_fname fname with | |||
| Dune | Cram -> [] | |||
(* TODO: Unsure about this, keeping it empty for now *) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not clear what's the TODO about
@davesnx I am not familiar with ocamlformat-mlx, but overall this looks correct. However the CI is failing with a non-exhaustive pattern matching error, could you fix that ? |
Embarrassing, I would push this forward. Thanks for the review @voodoos. I wanted to test this PR manually before merging as well, is it as easy as pinning to ensure everything works or do I need something else? |
I would expect so, please report if it doesn't :-) |
…eing based on older version of ocaml-lsp-server
fixing pattern matching errors and type discrepancies
Small PR to format mlx files with ocamlformat-mlx.
In mlx we encourage dune fmt via dune dialects, but the lsp runs those formatters outside of dune.