Closed dozed closed 2 months ago
I would propose to close this PR, since it is a feature which belongs more in the LSP4IJ plugin rather than being an ad-hoc solution in this project.
If you have this kind of error it seems that your language server returns the sem1ntic tokens capability.
In this case LSP4IJ tries to consume semantic tokens and it fails because yiur language server seems using a custom settings to enable semantic tokens.
To manage correctly this problem your language server needs to disable the semzntic tokens capabilty.
Badly LSP4IJ cannot manage semantic tokens dynamicly, and it will work only on start of the ls and not if you change your settings after the languzge server is started.
Please create an issue to the LSP4IJ repository.
With the most recent plugin version I got a lot of error message like this:
It seems the semantic tokens plugin is available but disabled by default: https://github.com/haskell/haskell-language-server/issues/4081#issuecomment-1949124141
This PR adds support for custom hls configuration. If a
hls.json
is found in the project root, then this file is used as initialization options.This allows to enable the semantic tokens plugin with
"globalOn": true
as in:For an example project see: https://github.com/dozed/test-hs
The proper way for this would probably be to create a plugin configuration interface, but this method here works for now.