haskell / haskell/lsp

Idea: a way to "lint" server messages to see if they're respecting client capabilities

Open
#306 0 comments 0 reactions 0 assignees View on GitHub
good first issue ZuriHac
Dominant language
Haskell
Stars
423
Forks
105
PR merge metrics
No merged PRs in 30d

Description

Clients provide servers with lots of information about what features they support. But it's very easy for the server to just ignore this and send the client things that they may not understand.

Now, I _think_ this is usually fine because usually this just means the server sends extra fields, which the client will ignore. But in some cases it can be important: for example if you send `documentChanges` in `WorkspaceEdit` to a client that only supports `changes`, then it may do nothing.

What I was thinking is that we could write, for each client capability, a "linter" that checks certain messages to see if they contain fields that the client hasn't stated that they support. Then we could, e.g. emit warnings if we see such fields, helping server authors notice if they're not honouring client capabilities.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.