Failures in visual studio code with robot framework

Hi,
I’m working with robot framework using visual studio code and I received the following errors:

Request textDocument/codeLens failed.
Request textDocument/documentHighlight failed.
Request textDocument/documentSymbol failed.

Why do these failures appear to me?

Those errors look like your visualstudio code is trying to use “language server protocol” - which is used for stuff like auto-complete/ jump to definition and so forth but they seem to fail;

Either

  1. Those features are not supported by the lsp itself
  2. lsp is not running
  3. lsp is running but its blocked by some local firewall of yours …

What plugin for Robot Framework are you using?

Robot Framework Language Server
or
Robot Code

I have both.
Robot Framework Language Server is the one producing these errors

Im not an expert here, nor have i ever used vscode so everything below is pure speculation:

Atleast robocorp’s lsp supports codeLens – maybe robotcode lsp does not ? Then, since both work on the “robot framework syntax”, vscode has option "does robot framework lsp support feature X (codelens and those other 2) and stores that value into settings.

Now, if you have 2, or at least had used both at some point, the settings still say that feature “xx” should be working and then vscode fires the events to another lsp that actually doesn’t support that feature and you are seeing an error.

Rationale for this is that for example, typescript codelens feature is enabled via
typescript.referencesCodeLens.enabled": true. – that does not mention which possible lsp provides that support…

Having 2 separate LSP’s at one time does feel like it would be prone to errors like this…

1 Like