Redundant imports/exports: use range only to determine which code actions are in scope#4063
Conversation
Rather than doing a full compare with incoming `Diagnostic` objects from the client. This brings the "remove redundant imports/exports" code actions more in line with behavior described in haskell#4056, and has the pleasant side-effect of fixing broken code actions in neovim (haskell#3857).
|
What do y'all think? Is this good to go, or any other open questions? Would probably be good for @michaelpj to take a look as well, to make sure I'm getting the intent of #4056 correct. I'd love to get #3857 closed out, it's such an annoying bug for neovim users... |
Awesome, thank you! As for getting it merged... do I just hang tight and wait for a maintainer to pull the trigger? |
|
Sorry, I am going to take a look at this! I was on holiday last week and it hasn't quite got to the top of my pile yet :) |
Oh, no worries at all, take your time of course! I just wanted to be sure I wasn't missing some step on my end. Thank you! |
…ions are in scope (haskell#4063) * Use *only* incoming range to determine which code actions are in scope Rather than doing a full compare with incoming `Diagnostic` objects from the client. This brings the "remove redundant imports/exports" code actions more in line with behavior described in haskell#4056, and has the pleasant side-effect of fixing broken code actions in neovim (haskell#3857). * Remove redundant imports ;) * Rename param for clarity --------- Co-authored-by: fendor <fendor@users.noreply.github.com>
michaelpj
left a comment
There was a problem hiding this comment.
This looks great to me btw!
...rather than doing a full compare with incoming
Diagnosticobjects from the client.This brings the "remove redundant imports/exports" code actions more in line with behavior described in #4056, and has the pleasant side-effect of fixing broken code actions in neovim (#3857).
Manually tested removing redundant imports and exports in both neovim and VS Code -- all working as expected!