-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add custom code action kinds for import related code actions #1570
Conversation
Just a minor nitpick, I would prefer |
This is marvelous, thanks so much! |
@berberman we should document these names in the read me and add instructions on how to use them |
Yeah, and I think we should document all ghcide code actions in some place |
👍 for documenting all these as they come up. One thing that occurs to me with the naming: it would be nice if the kind and the message sort of had the same structure and terminology? Let me show what I mean:
etc. At the moment there's a sort of implicit translation of terminology that users have to do: "add to import list" -> "extend"; "" -> "create a new import"; "top-level" and "withParent" aren't used in those ways. |
@berberman we are very close to having full import management on save, the main thing missing is "remove redundant import", which did not get a custom kind in this PR. |
Closes #1556
Suggestions are welcome! /cc @isovector
Several examples:
import ModuleA (stuffB)
import ModuleA (stuffB, stuffA)
quickfix.import.extend.thing.topLevel
import ModuleA ()
import ModuleA (A)
quickfix.import.extend.thing.topLevel
import ModuleA (A)
import ModuleA (A (Constructor))
quickfix.import.extend.thing.withParent
import Bar (Bar)
quickfix.import.new.thing.topLevel
import Bar (Bar(Bar))
quickfix.import.new.thing.withParent
import Numeric.Natural
quickfix.import.new.all
import qualified Data.List.NonEmpty as NE
quickfix.import.new.qualified