-
-
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
Provide all format suggestions in AlternatFormat Code Action #2790
Conversation
- Add new function that converts a NextPragmaInfo (identifies the location to insert a new Pragma) into an Insertion that will insert the new Extension - Provide all format choices instead of only currently active extensions
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.
The ghcide changes look fine to me
@@ -2,4 +2,4 @@ | |||
module TIntDtoND where | |||
|
|||
convertMe :: Integer | |||
convertMe = 125.345e3 |
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.
Did you mean to change this?
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.
Yeah, I updated the way Integers are converted into NumDecimal Format
Genuine test failure? |
No, I forgot that files with no explicit |
Great, and thanks for updating the docs nicely! |
…#2790) * Insert Language Extensions when required - Add new function that converts a NextPragmaInfo (identifies the location to insert a new Pragma) into an Insertion that will insert the new Extension - Provide all format choices instead of only currently active extensions * Update Test Suite * Update Documentation * Miscellaneous Cleanup * Push extraneous functions into where bindings * Remove unneeded logging * Add Haskell2010 pragma to fix 9.2 tests Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Closes #2772
Previously the alternate format plugin would only generate code actions based on enabled extensions. With this PR we now provide all formats as code actions and when necessary insert the required extension.
This PR also refactors a portion of the logic internal to the plugin so we can track the Extensions needed. Overall, functionality remains the same.