Skip to content

"Remove redundant import" action not showing up anymore #2845

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
andys8 opened this issue Apr 21, 2022 · 5 comments
Closed

"Remove redundant import" action not showing up anymore #2845

andys8 opened this issue Apr 21, 2022 · 5 comments
Labels
status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@andys8
Copy link
Collaborator

andys8 commented Apr 21, 2022

Your environment

Which OS do you use: Arch
Which LSP client (editor/plugin) do you use: Vim + CoC
Describe your project (alternative: link to the project): Stack

Steps to reproduce

  • Import a function that isn't used
  • Trigger coc-fix-current

image

Expected behaviour

Hint to remove this or all redundant imports shows up

Actual behaviour

Hint doesn't show up. Only option is to disable the warning.

image

suggestRemoveRedundantImport :: ParsedModule -> Maybe T.Text -> Diagnostic -> [(T.Text, [TextEdit])]

@andys8 andys8 added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Apr 21, 2022
@tim2CF
Copy link

tim2CF commented Apr 28, 2022

I have the same issue. Linux, Vim, Coc, Hls-1.6.1.1

@michaelpj
Copy link
Collaborator

What GHC version are you using?

@andys8
Copy link
Collaborator Author

andys8 commented Apr 30, 2022

Forgot to include more information about my system.
GHC is 8.10.7. More in other issue

@andys8 andys8 changed the title Remove redundant import not showing up anymore "Remove redundant import" action not showing up anymore Apr 30, 2022
@wz1000 wz1000 added status: needs info Not actionable, because there's missing information and removed status: needs triage labels Sep 7, 2022
@wz1000
Copy link
Collaborator

wz1000 commented Sep 7, 2022

Could you share LSP communication logs for the HLS session? This may be a client issue.

@andys8
Copy link
Collaborator Author

andys8 commented Sep 8, 2022

Hey there, I retested again. For the example I posted, it seems to work again with the current setup I have. There is an action to remove the import

image
image

Setup

  • HLS: a89ba41
  • Stack 2.7.5
  • Cabal 3.8.1
  • GHC tested with 8.10.7 and 9.2.4 projects (both stack)
  • Vim 9.0 and CoC 0.0.82

@andys8 andys8 closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants