summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 11:05:19 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 11:05:19 -0500
commit4232df89b50754779814a97f374451fce2e36447 (patch)
treec7bfa4bb445717cc34b24a905b3c4b8398126422 /lsp.h
parent61db5a1a07f4fbe953d7cab9b6714fe5157a1265 (diff)
global request IDs
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/lsp.h b/lsp.h
index 2f6b090..3529174 100644
--- a/lsp.h
+++ b/lsp.h
@@ -301,6 +301,18 @@ typedef struct {
LSPLocation *locations;
} LSPResponseDefinition;
+// SymbolInformation in the LSP spec
+typedef struct {
+ LSPString name;
+ LSPSymbolKind kind;
+ bool deprecated;
+ LSPLocation location;
+} LSPSymbolInformation;
+
+typedef struct {
+ LSPSymbolInformation *symbols;
+} LSPResponseWorkspaceSymbols;
+
typedef LSPRequestType LSPResponseType;
typedef struct {
LSPRequest request; // the request which this is a response to
@@ -356,10 +368,6 @@ typedef struct LSP {
// thread-safety: created in lsp_create, then only accessed by the communication thread
Process process;
- // Which ID number the next request will get
- // thread-safety: atomic, all that matters is `LSPRequestID id = ++lsp->request_id;` works
- _Atomic LSPRequestID request_id;
-
SDL_mutex *document_mutex;
// for our purposes, folders are "documents"
// the spec kinda does this too: WorkspaceFolder has a `uri: DocumentUri` member.