clang-tools  14.0.0git
Classes | Public Member Functions | List of all members
clang::clangd::ClangdLSPServer Class Reference

This class exposes ClangdServer's capabilities via Language Server Protocol. More...

#include <ClangdLSPServer.h>

Inheritance diagram for clang::clangd::ClangdLSPServer:
Inheritance graph
[legend]
Collaboration diagram for clang::clangd::ClangdLSPServer:
Collaboration graph
[legend]

Classes

class  MessageHandler
 
struct  Options
 

Public Member Functions

 ClangdLSPServer (Transport &Transp, const ThreadsafeFS &TFS, const ClangdLSPServer::Options &Opts)
 
 ~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...
 
void profile (MemoryTree &MT) const
 Profiles resource-usage. More...
 

Detailed Description

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 41 of file ClangdLSPServer.h.

Constructor & Destructor Documentation

◆ ClangdLSPServer()

clang::clangd::ClangdLSPServer::ClangdLSPServer ( Transport Transp,
const ThreadsafeFS TFS,
const ClangdLSPServer::Options Opts 
)

Definition at line 1420 of file ClangdLSPServer.cpp.

◆ ~ClangdLSPServer()

clang::clangd::ClangdLSPServer::~ClangdLSPServer ( )

The destructor blocks on any outstanding background tasks.

Definition at line 1501 of file ClangdLSPServer.cpp.

Member Function Documentation

◆ profile()

void clang::clangd::ClangdLSPServer::profile ( MemoryTree MT) const

Profiles resource-usage.

Definition at line 1519 of file ClangdLSPServer.cpp.

References clang::clangd::MemoryTree::child().

◆ run()

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.

Returns
Whether we shut down cleanly with a 'shutdown' -> 'exit' sequence.

Definition at line 1508 of file ClangdLSPServer.cpp.


The documentation for this class was generated from the following files: