clang-tools
11.0.0
|
This class exposes ClangdServer's capabilities via Language Server Protocol. More...
#include <ClangdLSPServer.h>
Classes | |
class | MessageHandler |
Public Member Functions | |
ClangdLSPServer (Transport &Transp, const ThreadsafeFS &TFS, const clangd::CodeCompleteOptions &CCOpts, const clangd::RenameOptions &RenameOpts, llvm::Optional< Path > CompileCommandsDir, bool UseDirBasedCDB, llvm::Optional< OffsetEncoding > ForcedOffsetEncoding, const ClangdServer::Options &Opts) | |
If CompileCommandsDir has a value, compile_commands.json will be loaded only from CompileCommandsDir . More... | |
~ClangdLSPServer () | |
The destructor blocks on any outstanding background tasks. More... | |
bool | run () |
Run LSP server loop, communicating with the Transport provided in the constructor. More... | |
This class exposes ClangdServer's capabilities via Language Server Protocol.
MessageHandler binds the implemented LSP methods (e.g. onInitialize) to corresponding JSON-RPC methods ("initialize"). The server also supports $/cancelRequest (MessageHandler provides this).
Definition at line 37 of file ClangdLSPServer.h.
clang::clangd::ClangdLSPServer::ClangdLSPServer | ( | Transport & | Transp, |
const ThreadsafeFS & | TFS, | ||
const clangd::CodeCompleteOptions & | CCOpts, | ||
const clangd::RenameOptions & | RenameOpts, | ||
llvm::Optional< Path > | CompileCommandsDir, | ||
bool | UseDirBasedCDB, | ||
llvm::Optional< OffsetEncoding > | ForcedOffsetEncoding, | ||
const ClangdServer::Options & | Opts | ||
) |
If CompileCommandsDir
has a value, compile_commands.json will be loaded only from CompileCommandsDir
.
Otherwise, clangd will look for compile_commands.json in all parent directories of each file. If UseDirBasedCDB is false, compile commands are not read from disk.
Definition at line 1356 of file ClangdLSPServer.cpp.
clang::clangd::ClangdLSPServer::~ClangdLSPServer | ( | ) |
The destructor blocks on any outstanding background tasks.
Definition at line 1410 of file ClangdLSPServer.cpp.
bool clang::clangd::ClangdLSPServer::run | ( | ) |
Run LSP server loop, communicating with the Transport provided in the constructor.
This method must not be executed more than once.
Definition at line 1417 of file ClangdLSPServer.cpp.