clang-tools 19.0.0git
Public Types | Public Attributes | List of all members
clang::clangd::PathMapping Struct Reference

PathMappings are a collection of paired client and server paths. More...

#include <PathMapping.h>

Public Types

enum class  Direction { ClientToServer , ServerToClient }
 

Public Attributes

std::string ClientPath
 
std::string ServerPath
 

Detailed Description

PathMappings are a collection of paired client and server paths.

These pairs are used to alter file:// URIs appearing in inbound and outbound LSP messages, as the client's environment may have source files or dependencies at different locations than the server. Therefore, both paths are stored as they appear in file URI bodies, e.g. /usr/include or /C:/config

For example, if the mappings were {{"/home/user", "/workarea"}}, then a client-to-server LSP message would have file:///home/user/foo.cpp remapped to file:///workarea/foo.cpp, and the same would happen for replies (in the opposite order).

Definition at line 37 of file PathMapping.h.

Member Enumeration Documentation

◆ Direction

Enumerator
ClientToServer 
ServerToClient 

Definition at line 40 of file PathMapping.h.

Member Data Documentation

◆ ClientPath

std::string clang::clangd::PathMapping::ClientPath

Definition at line 38 of file PathMapping.h.

◆ ServerPath

std::string clang::clangd::PathMapping::ServerPath

Definition at line 39 of file PathMapping.h.


The documentation for this struct was generated from the following file: