Debian Codegraph @

LspCpp/include/LibLsp/lsp/workspace/workspaceFolders.h

raw
1 #pragma once
2
3 #include "LibLsp/JsonRpc/RequestInMessage.h"
4 #include "LibLsp/JsonRpc/lsResponseMessage.h"
5
6 #include "LibLsp/lsp/lsDocumentUri.h"
7 struct WorkspaceFolder
8 {
9 /**
10 * The associated URI for this workspace folder.
11 */
12
13 lsDocumentUri uri;
14
15 /**
16 * The name of the workspace folder. Defaults to the uri's basename.
17 */
18 std::string name;
19
20 MAKE_SWAP_METHOD(WorkspaceFolder, uri, name)
21 };
22 MAKE_REFLECT_STRUCT(WorkspaceFolder, uri, name);
23
24 /**
25 * The workspace/workspaceFolders request is sent from the server to the client
26 * to fetch the current open list of workspace folders.
27 *
28 * @return null in the response if only a single file is open in the tool,
29 * an empty array if a workspace is open but no folders are configured,
30 * the workspace folders otherwise.
31 */
32 DEFINE_REQUEST_RESPONSE_TYPE(
33 WorkspaceFolders, optional<JsonNull>, optional<std::vector<WorkspaceFolder>>, "workspace/workspaceFolders"
34 );