-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Can't get FixIt to add import #4467
Comments
Hi, thank you for the bug report! Unfortunately, I can not reproduce the described issue on GHC 9.6.6 or 9.8.2. The |
Content of the
is
|
Can you try to execute the CodeAction in your editor while passing these flags to HLS? |
@fendor , would you mind clarifying which flags? |
The flags |
I've passed those options to HLS via the IDE (Vim+YCM); here's the log:
|
Thanks! I am wondering whether this is related to #4451... |
@fendor , would you mind helping understand what I should expect from HLS, in this case? I mean, how can I use it in a standalone way so that I can see what messages it sends to the IDE? I mean, |
It looks like HLS supports Presumably, you can tell your client to log the lsp messages. However, I am not sure how to do that with vim. |
@Aster89 In #4478, I implemented a fallback handler for If you are using |
I just tried. I had my finger crossed for 20 minutes:
but it didn't end well 😢
(Make sure to scroll the snippet above to the right to see all of the message.) |
Your environment
Which OS do you use?
ArchLinux
Which version of GHC do you use and how did you install it?
9.8.2, managed via GHCup
How is your project built (alternative: link to the project)?
Just created a project via
cabal init --simple
, answering2) Executable
to the first and only question.Which LSP client (editor/plugin) do you use?
Terminal Vim + YCM
Which version of HLS do you use and how did you install it?
Should be 2.9.0.1, if I understand correctly (see debug info).
Have you configured HLS in any way (especially: a
hie.yaml
file)?Not that I'm aware of (and log says definitely I don't have a
hie.yaml
file), but please ask specific question if anything makes you think I have.Steps to reproduce
cabal init --simple
,f = when
,FixIt
onwhen
,import Control.Monad (when)
(any other will do I guess)Expected behaviour
import Control.Monad (when)
should be added in the preamble of the file.Actual behaviour
Expected behavior does not happen, and this error is triggered instead:
Debug information
This is the log of the HLS:
The text was updated successfully, but these errors were encountered: