-
Notifications
You must be signed in to change notification settings - Fork 63
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 lsp-haskell-plugins config, for coming HLS feature #100
Conversation
This is a first stab at support for haskell/haskell-language-server#691 We will probably have to have a big switch here too, to not send the new config unless we know hls supports it. How? Provides context for emacs-lsp#99
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.
Seems plausible.
We will probably have to have a big switch here too, to not send the
new config unless we know hls supports it. How?
Ugh, I have no idea how you navigate this, actually. What does HLS do if you send config options that it doesn't know about? Perhaps ignoring it (or sending a warning?) will make this kind of thing easier in futuer?
@@ -238,7 +310,23 @@ and `lsp-haskell-server-args' and `lsp-haskell-server-wrapper-function'." | |||
("haskell.liquidOn" lsp-haskell-liquid-on t) | |||
("haskell.diagnosticsOnChange" lsp-haskell-diagnostics-on-change t) | |||
("haskell.maxNumberOfProblems" lsp-haskell-max-number-of-problems) | |||
("haskell.hlintOn" lsp-haskell-hlint-on t))) | |||
("haskell.hlintOn" lsp-haskell-hlint-on t) |
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.
Should we change this to haskell.plugin.hlint.globalOn
?
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.
If so let's move the hlint defcustom
under lsp-haskell-plugins
too.
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 is one of the legacy config items, which will have to be moved/deprecated some time. See comments at haskell/haskell-language-server#691 (review)
@@ -238,7 +310,23 @@ and `lsp-haskell-server-args' and `lsp-haskell-server-wrapper-function'." | |||
("haskell.liquidOn" lsp-haskell-liquid-on t) |
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.
Is the liquid haskell support also going to become a 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.
There are a whole lot of legacy configuration items we brought over from HIE, some of which do things, some don't.
We have kept them so the parser doesn't blow up on the hls side if they get sent.
And we probably need a better deprecation story. It is important to report errors for malformed config, but it can become annoying.
;; --------------------------------------------------------------------- | ||
;; Plugin-specific configuration | ||
(defgroup lsp-haskell-plugins nil | ||
"Customization group for 'lsp-haskell' plugins." |
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.
"Customization group for 'lsp-haskell' plugins." | |
"Customization group for 'haskell-language-server' plugins." |
They're not lsp-haskell
plugins, after all!
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.
well, the elisp package is called lsp-haskell
@michaelpj FYI I just ran this version of the emacs client against an older HLS, and nothing bad happened (except the new config did not get recognised). And this is because the |
This is a first stab at support for haskell/haskell-language-server#691
We will probably have to have a big switch here too, to not send the
new config unless we know hls supports it. How?
Provides context for #99