From 45d69107725a02cf6d912a571b771da3ef5abfbf Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 4 Aug 2023 19:35:48 -0400 Subject: textDocument/documentLink parsing --- lsp.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lsp.h') 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 @@ -190,6 +191,10 @@ typedef struct { bool include_declaration; } LSPRequestReferences; +typedef struct { + LSPDocumentID document; +} LSPRequestDocumentLink; + typedef struct { // string to filter the symbols by char *query; @@ -233,6 +238,7 @@ typedef struct { LSPRequestMessage message; LSPRequestDidChangeWorkspaceFolders change_workspace_folders; LSPRequestRename rename; + LSPRequestDocumentLink document_link; } data; } LSPRequest; @@ -474,6 +480,16 @@ typedef struct { } LSPWorkspaceEdit; 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 @@ -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 { -- cgit v1.2.3