profile
viewpoint

Ask questionsserver->client "show location list" request

codeAction and codeLens are valuable generic hooks for the server to provide features. These features are limited by what actions LSP allows the server to trigger on the client.

Today the most useful are: applyTextEdits, showMessage, showDocument (new, thanks!). It'd be a nice addition to be able to publish a list of locations, similar to how textDocument/references results are displayed.

The most obvious use case: "show references" is the stock example of a code lens, but can't be implemented directly in LSP today. (It requires some extension like a known Command name that is handled by an editor plugin). #788 suggests to standardize some such Commands, but a server->client request would be more composable, easier to document, be guarded by capabilities in a better-understood way, etc.

(clangd is considering implementing this as an extension as part of our codeLens support, in order to clearly document what client support is required)

microsoft/language-server-protocol

Answer questions rwols

I am okay with any of the three proposed options. But I do agree with @puremourning that (1) won't really benefit the ecosystem in practice.

If we go with (2), then #1119 seems to become redundant. Perhaps @kdvolder and @mickaelistria want to have a say in this as well.

useful!
source:https://uonfu.com/
answerer
Raoul Wols rwols @CopernicaMarketingSoftware The Netherlands primef.actor
Github User Rank List