[PATCH] D52937: [clangd] Add clangd.serverInfo command to inspect server state.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 8 13:54:39 PDT 2018


MaskRay added a comment.

Rather than use a `workspace/executeCommand` command, you may consider making it a custom request message whose method name starts with `$/`

https://microsoft.github.io/language-server-protocol/specification

> Notification and requests whose methods start with ‘$/’ are messages which are protocol implementation dependent and might not be implementable in all clients or servers. For example if the server implementation uses a single threaded synchronous programming language then there is little a server can do to react to a ‘$/cancelRequest’. If a server or client receives notifications or requests starting with ‘$/’ it is free to ignore them if they are unknown.

The return type of `workspace/executeCommand` is `any | null` per spec, but its interpretation may not be that flexible in some clients. It is pretty simple to use lsp-mode eglot vscode-languageclient to send custom request messages, though.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52937





More information about the cfe-commits mailing list