Skip to content

Code action "Apply all hints" shows everywhere #1341

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

Closed
berberman opened this issue Feb 10, 2021 · 3 comments · Fixed by #1442
Closed

Code action "Apply all hints" shows everywhere #1341

berberman opened this issue Feb 10, 2021 · 3 comments · Fixed by #1442
Labels
component: hls-hlint-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@berberman
Copy link
Collaborator

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 0.9.0.0 (GHC: 8.10.3) (PATH: /home/berberman/.cabal/store/ghc-8.10.3/haskell-language-server-0.9.0.0-18058efd60909de3b42ad413a831db1d65bdb70ecd78bdd620d47f958f9480c0/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:          3.2.0.0
stack:          Not found
ghc:            8.10.3

Which lsp-client do you use:
vscode

Not sure if it's intended, but imo this code action should populate accompanying each single fix, just like the code action for removing all redundant imports. (cc @jneira)

A

on whitespace:

B

@jneira
Copy link
Member

jneira commented Feb 10, 2021

Hi, not sure if i am understanding it but the screenshots are the behaviour you want to have, no?
The Apply all hints is showed for every hlint diagnostic when there is more than one hlint diagnostic in a file, on purpose.
Sorry if i am missing something obvious but how you trigger code actions directly without quick fix?

@berberman
Copy link
Collaborator Author

Sorry, my bad, I wasn't being clear. There were two hlint diagnostics in the file. At right places (where the code we want to fix), two code actions populated as expected. But I could always get "Apply all hints" at any point in the file. I recorded a video to show that:

out.mp4

@jneira
Copy link
Member

jneira commented Feb 10, 2021

Oh, i see now, thanks for the clarification, it adds unnecessary noise, yeah

@jneira jneira added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. and removed type: enhancement New feature or request labels Feb 10, 2021
zkbpkp added a commit to zkbpkp/haskell-language-server that referenced this issue Feb 26, 2021
@mergify mergify bot closed this as completed in #1442 Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hls-hlint-plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
2 participants