haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

No Config is generated for a plugin with only a Goto Definition Request Handler

Open fendor opened this issue 1 year ago • 1 comments

In #4126, I noticed the CI was green, even though the PR doesn't modify the vscode extension schema json file.

The reason seems to be in https://github.com/haskell/haskell-language-server/blob/master/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs#L114, we only generate an "Enable Plugin" config, if there is exactly one other config. However, we don't generate a config for Goto Definition handlers.

I think, we should also generate an "Enable Plugin" Config, if no other config exists.

fendor avatar Mar 09 '24 19:03 fendor

It is not as trivial as to simply generate the globalOn field for each plugin, as this exposes internal plugins to the outside world as well, in particular:

              "LSPRecorderCallback": {
                  "globalOn": true
              },

which is not something we want to do, I believe.

Alternatively, we could add options for Goto Definition handlers to handlersToGenericDefaultConfig. I think that's directly at odds with #4094, but perhaps still worth it.

fendor avatar Mar 11 '24 18:03 fendor