emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

Add lsp-haskell-plugins config, for coming HLS feature #100

Closed alanz closed 3 years ago

alanz commented 3 years ago

This is a first stab at support for https://github.com/haskell/haskell-language-server/pull/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

alanz commented 3 years ago

@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 FromJSON instance looks for known keys, and so will ignore old ones. And uses defaults for missing keys. So should be safe in the case of dropping config items too.

https://github.com/haskell/haskell-language-server/blob/0063ec73340a3e741985b46da1b3a40e6ac9c03e/hls-plugin-api/src/Ide/Plugin/Config.hs#L77-L85