-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Extend import suggestions don't work when there's more than one option #838
Comments
I am using hls with emacs. I do see the following CodeLens:
And, when I do lsp-execute-code-actions, I see a lot of options listed in the menu I can choose from. I have pasted a few here:
Am I checking this incorrectly? |
Yes. This ticket is for the "extend import" code action. You are missing the two import declarations in the original repro. |
Do you have more context? Files to modify? and how I can test the changes?:) |
The relevant code is in Development.IDE.Plugin.CodeAction, function |
Do you actually have unit test for this section? I can't find anything in /tst/src/development/ide |
So, here is the cause of the issue. When we have one suggestion for 'Add imports', the complier error looks like this:
The But, when you have multiple suggestions, for code like this:
then the `diagnostics from the compiler is
which does not match the current regex. I have a fix for this here: haskell/ghcide#913 |
* for issues haskell#554, haskell#590 and haskell#838
Given the following code:
ghcide will produce a code action "Add fromList to the import list of Data.Map".
However, the code below will not produce an "Add fromList to the importList" suggestions at all:
The text was updated successfully, but these errors were encountered: