-
-
Notifications
You must be signed in to change notification settings - Fork 389
fix new import position #2981
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
fix new import position #2981
Conversation
it's not ready, I found another bad case |
4cc6458
to
d168667
Compare
CI is green now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some other place that inserts imports too, right? Is it using the same code now?
I'm only aware of code action and completion. Both of them use the same function to determine the insert position. I'll try to look for more, but if anyone knows, please comment here. |
The various plugins that do stuff with imports, maybe? |
Previously we fixed the functions that extend import lists to use ghc-exactprint, and this PR fixes the functions that insert new import declarations. So It think we are good now |
…age-server into 2414-fix-import-pos
I searched for |
Maybe this is ok to be merged? |
@Mergifyio refresh |
✅ Pull request refreshed |
* haskell#2414 fix new import position * fix auto import for ghc version < 9.2 * re-fix it for ghc-9.2 * handle comments * add more comments * reword comments of findPositionNoImports Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This will close #2414
Progress: