-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Add support for external Ormolu #3771
Conversation
This is the pendant of haskell/haskell-language-server#3771
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.
Thanks for doing this! Looks fine to me, I'll leave it to @georgefst to review the code in more detail :)
This is the pendant of haskell/haskell-language-server#3771
@georgefst do you know if you will be able to review this PR soon please? 🙏 |
Related to haskell#411
004fe72
to
3d08ccf
Compare
I'll try to look at the code in more detail soon otherwise. |
Is there anything I can do to move this PR forward? 😅 |
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.
Looks fine. The fourmolu
plugin got refactored a little recently, so if you like you could mirror that here to keep them as close together as possible. Optional, though.
I just tried that, but because of recent commits, I am no longer able to compile the HLS project:
If you have any tip to support developing HLS on Nix again, I will gladly proceed, but otherwise, this is the end for me 🤷 |
|
This goes further but still fails:
I really don't want to go down the path of installing more and more things globally on my system 😐 I stopped doing that in the past precisely because it made me unable to work on several projects in parallel. |
That's strange, |
@michaelpj would you be ok with merging the PR as is? The re-alignment can be done in a follow-up PR |
Sure |
This is the pendant of haskell/haskell-language-server#3771
Related to #411
This PR adds support for a new LSP flag
haskell.plugin.ormolu.config.external
, boolean, defaultfalse
. If set totrue
, it uses theormolu
binary from the path rather than the built-in one.This is similar to
haskell.plugin.fourmolu.config.external
.This PR takes inspiration from:
plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs
This PR also documents the flag
haskell.plugin.fourmolu.config.external
.Example HLS debug logs when formatting:
I will try to open PRs to the various Haskell LSP Clients to also support those 2 flags (Ormolu and Fourmolu) once this PR is merged.
I see that the CI fails, but it looks like it's unrelated to my PR. Could it be CI flakiness?CI is green now.