haskell / haskell/lsp

Server implementations should have a way to modify ServerCapabilities directly

Open
#517 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
423
Forks
105
PR merge metrics
No merged PRs in 30d

Description

At the moment we infer the `ServerCapabilities` from the `Handlers` and `Options`. The only way for servers to alter the capabilities that we infer is if we provide a handle for doing that via `Options`. In some ways that's nice and discoverable, but it might be easier just to let the server directly modify the inferred `ServerCapbilities` before we send it back.

In many cases I think it would just be fiddly to expose things via `Options`. For example, most server capabilities for methods allow you to opt-in to client-initiated progress. At the moment we just always disable that and rely on server-initiated progress, but it would be reasonable for a server to want to opt in... but even then you probably only want to do it for certain methods. So we could have a `methodsToOptInToClientInitiatedProgress` option... or we could just let the server modify the `ServerCapabilities`.

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.