-
Notifications
You must be signed in to change notification settings - Fork 90
After server restart fourmolu uses default config #920
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
Comments
Hi, thank you for the bug report! Moving the bug report to the VSCode extension repository, which is likely the culprit in this bug. |
Just fyi, I can reproduce the issue. I suspect that we transmit the configuration only on extension startup, and the HLS restart command doesn't send the configuration again. Maybe we can manually send the configuration again. |
@fendor |
Oh, very interesting! Perhaps it is related to our recent upgrade to the latest vscode-languageClient version... |
I'll take a look at this later. |
Update: After adding log to ormolu, I found hls is going to call ormolu plugin instead of fourmolu... |
can confirm I was getting the same error on HLS 2.0.1 with Vscode Haskell extension
for an workaround, using |
Update: The problem is the latest See context here: microsoft/vscode-languageserver-node#524 But we still don't know what makes this change happen, I'll try to investigate it before pushing a fix. ![]() |
It causes troubles due to following the newer LSP spec which HLS is not ready for. For details, see haskell#920 and haskell/lsp#510, etc...
We published a new release that downgraded |
After building HLS off haskell/haskell-language-server#3773 I'm pretty sure this is now fixed. With version 2.4.0 of the extension, I can see that we're doing the correct negotiation with |
Corresponding lsp PR is here btw: haskell/lsp#512 |
thanks! seems working now |
Your environment
Which OS do you use?
Which version of GHC do you use and how did you install it?
9.2.8 from ghcup
How is your project built (alternative: link to the project)?
via stack
Which LSP client (editor/plugin) do you use?
vs code
Which version of HLS do you use and how did you install it?
2.0.0.1 from ghcup
Have you configured HLS in any way (especially: a
hie.yaml
file)?hie.yaml
and vs code settings:
Steps to reproduce
Expected behaviour
Fourmolu will continue to use custom config as it was before HLS restart
Actual behaviour
Fourmolu will use it's default config instead of I have in root
Debug information
Tested without
"haskell.plugin.fourmolu.config.external": true
- same behaviour.When I reload window - it works as expected.
Also, at recent HLS version there was no such problem.
HLS output with expected behaviour (BEFORE restart)
HLS output with UNexpected behaviour (AFTER restart)
The text was updated successfully, but these errors were encountered: