-
-
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
Teach HLS about different file extensions #2945
Conversation
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.
This looks good to me. Are you going to send a companion change to the VSCode Haskell extension to update the metadata?
Yeah, the companion PR is here: haskell/vscode-haskell#618 |
386bf8a
to
99dc22e
Compare
f514d2e
to
a9041fc
Compare
@@ -6714,7 +6714,7 @@ unitTests recorder logger = do | |||
] ++ Ghcide.descriptors (cmapWithPrio LogGhcIde recorder) | |||
|
|||
testIde recorder (IDE.testing (cmapWithPrio LogIDEMain recorder) logger){IDE.argsHlsPlugins = plugins} $ do | |||
_ <- createDoc "haskell" "A.hs" "module A where" | |||
_ <- createDoc "A.hs" "haskell" "module A where" |
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.
cea8009
to
8506c27
Compare
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 think this PR needs a bit of trimming so it just does what it says, otherwise things get a bit confusing.
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.
Oops I missed a file. Thanks for all the Haddock!
8506c27
to
9d2b79d
Compare
dc3d7c2
to
3b6b472
Compare
NotificationHandler now distinguishes between different file extensions RequestHandler distinguishes between different file extensions
The hierarchy looks as follows: PluginMethod (pluginEnabled) | ----------------------------------- | | PluginRequestMethod PluginNotificationMethod
3b6b472
to
e7e60bc
Compare
cfe643e
to
dd56166
Compare
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.
LGTM!
@michaelpj Thank you for your time and thorough reviews! |
* Fix parameter switch-up * Generalise file extension handling for plugins NotificationHandler now distinguishes between different file extensions RequestHandler distinguishes between different file extensions * Introduce PluginMethod Typeclass hierarchy The hierarchy looks as follows: PluginMethod (pluginEnabled) | ----------------------------------- | | PluginRequestMethod PluginNotificationMethod * Add example plugin * Improve documentation for plugins * Simplify Plugin Handling code Co-authored-by: Jana Chadt <[email protected]> Co-authored-by: Jana Chadt <[email protected]> Co-authored-by: Fendor <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This PR is the foundation for #2940 and as such, I'd be really happy if we could get a review here before ZuriHac :)
I am working on a minimal example Plugin, that should illustrate that stuff works by tomorrow.
The Idea is to teach
PluginDescriptors
about the file-extension.This PR is currently untested and only cherry-picked from #2047, the example plugin will have to suffice as tests.