summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-04 19:35:48 -0400
committerpommicket <pommicket@gmail.com>2023-08-04 19:35:48 -0400
commit45d69107725a02cf6d912a571b771da3ef5abfbf (patch)
tree6b5d44104f57074dc00f1bab8eed986ca707b8a2 /lsp.h
parentf278b832dc6e085d05b243bbae2af82e78e36d6d (diff)
textDocument/documentLink parsing
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lsp.h b/lsp.h
index fe74703..4e5cf03 100644
--- a/lsp.h
+++ b/lsp.h
@@ -85,6 +85,7 @@ typedef enum {
LSP_REQUEST_HIGHLIGHT, //< textDocument/documentHighlight
LSP_REQUEST_REFERENCES, //< textDocument/references
LSP_REQUEST_RENAME, //< textDocument/rename
+ LSP_REQUEST_DOCUMENT_LINK, //< textDocument/documentLink
LSP_REQUEST_WORKSPACE_SYMBOLS, //< workspace/symbol
LSP_REQUEST_DID_CHANGE_WORKSPACE_FOLDERS, //< workspace/didChangeWorkspaceFolders
@@ -191,6 +192,10 @@ typedef struct {
} LSPRequestReferences;
typedef struct {
+ LSPDocumentID document;
+} LSPRequestDocumentLink;
+
+typedef struct {
// string to filter the symbols by
char *query;
} LSPRequestWorkspaceSymbols;
@@ -233,6 +238,7 @@ typedef struct {
LSPRequestMessage message;
LSPRequestDidChangeWorkspaceFolders change_workspace_folders;
LSPRequestRename rename;
+ LSPRequestDocumentLink document_link;
} data;
} LSPRequest;
@@ -475,6 +481,16 @@ typedef struct {
typedef LSPWorkspaceEdit LSPResponseRename;
typedef struct {
+ LSPRange range;
+ LSPString target;
+ LSPString tooltip;
+} LSPDocumentLink;
+
+typedef struct {
+ LSPDocumentLink *links;
+} LSPResponseDocumentLink;
+
+typedef struct {
LSPRequest request; // the request which this is a response to
char *error; // if not NULL, the data field will just be zeroed
// LSP responses tend to have a lot of strings.
@@ -492,6 +508,7 @@ typedef struct {
LSPResponseRename rename;
LSPResponseHighlight highlight;
LSPResponseReferences references;
+ LSPResponseDocumentLink document_link;
} data;
} LSPResponse;
@@ -524,6 +541,7 @@ typedef struct {
bool workspace_folders_support;
bool rename_support;
bool references_support;
+ bool document_link_support;
} LSPCapabilities;
typedef struct LSP {