-
-
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
Ormolu flags #246
Ormolu flags #246
Conversation
ms_hspp_opts contains the LANGUAGE and OPTIONS pragmas what we want here is the cabal/stack options instead
Because why not?
@@ -36,24 +43,24 @@ descriptor plId = (defaultPluginDescriptor plId) | |||
-- --------------------------------------------------------------------- | |||
|
|||
provider :: FormattingProvider IO | |||
provider _lf ideState typ contents fp _ = do | |||
provider lf ideState typ contents fp _ = withIndefiniteProgress lf title Cancellable $ do |
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.
I guess we should have these for all formatting providers?
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.
In many other plugins too, specially in the Eval plugin
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.
Awesome, thanks!
@pepeiborra Depends on what you mean by "process". |
Does Ormolu use ghc to parse source files? If yes, then ghc will see the language and options pragmas and act accordingly |
@pepeiborra In that sense, yes, we use functions from GHC to read pragmas before we run the parser. |
So, this is ready for merge, right? |
There's two independent changes here:
Fixes #245