mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
initialize: implement serverInfo (LSP 3.15.0)
Return serverInfo for an initialize request. This helps clients to identify ccls even when they just connect to a TCP port and allows them to easily implement server specific functionalities like $ccls/navigate.
This commit is contained in:
parent
0a1e08a8ca
commit
760f5e57ff
@ -240,3 +240,5 @@ endif()
|
||||
|
||||
set_property(SOURCE src/main.cc APPEND PROPERTY
|
||||
COMPILE_DEFINITIONS CCLS_VERSION=\"${CCLS_VERSION}\")
|
||||
set_property(SOURCE src/messages/initialize.cc APPEND PROPERTY
|
||||
COMPILE_DEFINITIONS CCLS_VERSION=\"${CCLS_VERSION}\")
|
||||
|
@ -221,8 +221,13 @@ REFLECT_STRUCT(InitializeParam, rootUri, capabilities, trace, workspaceFolders);
|
||||
|
||||
struct InitializeResult {
|
||||
ServerCap capabilities;
|
||||
struct ServerInfo {
|
||||
const char *name = "ccls";
|
||||
const char *version = CCLS_VERSION;
|
||||
} serverInfo;
|
||||
};
|
||||
REFLECT_STRUCT(InitializeResult, capabilities);
|
||||
REFLECT_STRUCT(InitializeResult::ServerInfo, name, version);
|
||||
REFLECT_STRUCT(InitializeResult, capabilities, serverInfo);
|
||||
|
||||
struct FileSystemWatcher {
|
||||
std::string globPattern = "**/*";
|
||||
|
Loading…
Reference in New Issue
Block a user