rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.51k stars 257 forks source link

Unknown RLS configuration: `languageServerHaskell` #1640

Open nobv opened 4 years ago

nobv commented 4 years ago

It seems that LSP initialized successfully, but error message shown.

alexheretic commented 4 years ago

This is a warning that rls doesn't know about the config key languageServerHaskell that was sent to it during initialization in the settings object.

In general you want to know when rls doesn't recognise your config as it'll mean it won't work as you expect. In this case the client is clearly sending rls unrelated stuff.

You can either ignore the warning or fix the client so it only sends rls config to rls.

LuisChDev commented 4 years ago

I get the same error message. @nobv are you using Spacemacs? I removed the Haskell layer and a different one appears:

dap-gdb-lldb: webfreak.debug debug extension are not set. You can download it with M-x dap-gdb-lldb-setup  

after executing the command, I get the following messages:

Contacting host: marketplace.visualstudio.com:443
uncompressing publicsuffix.txt.gz...done
Wrote /tmp/exth27Znb.zip  

Then if I restart RLS, I get the same error. It's actually two:

LSP :: rls:24101 initialized successfully
LSP :: Unknown RLS configuration: `crate_blacklist` 
LSP :: Unknown RLS configuration: `languageServerHaskell`   

Completely new project with cargo new. I have no idea how Haskell got involved here, since I have nothing related installed. Should we take this issue to Spacemacs maintainers?

nobv commented 4 years ago

@LuisChDev Thanks to response!(I didn't recognized...)

No, I'm using Doom emacs. But currently, no error occurs.

So this issue can close, I think. Thanks .

OJFord commented 3 years ago

RLS configuration is under "rust": { ... }; clearly LSP clients vary in whether or not they send servers the entire configuration, or just the corresponding entry. I think it is at least reasonable for them not to modify it - since it can also be 'flat', such as "rust.blah": "on" at the top level.

In my opinion, RLS should ignore top level keys that are not either exactly "rust", or beginning "rust.". For what it's worth, I don't see similar warnings from my other language servers (gopls, pyls, svelteserver, terraform-ls, vim-language-server, vls).

My language client is LanguageClient-neovim (using plain vim); I will open an issue there about the possibility of not sending other servers' config if someone hasn't already, but as I say, I think it's reasonable, so it might be deliberate/known. (I wonder if the LSP spec is explicit one way or the other, or comments on it at all.. 👀.)

OJFord commented 3 years ago

It seems the server can ask for specific configuration sections, and the client is responsible for converting whatever its format is (which isn't required to be this JSON structure anyway) into the canonical form: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_configuration

So RLS can/should just ask for section: "rust"? Or am I misunderstanding?