summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-27 23:15:27 -0500
committerpommicket <pommicket@gmail.com>2022-12-27 23:15:27 -0500
commit47adb1651d35dcc545850916c4a16b747901dba5 (patch)
treef329f973016d15f17b0437202c26f4ca93a0b7be /lsp.h
parente112a90ff73f7f407ed2251f905565713c237bc1 (diff)
more signature help
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lsp.h b/lsp.h
index 1c75861..4491cd2 100644
--- a/lsp.h
+++ b/lsp.h
@@ -245,6 +245,26 @@ typedef struct {
LSPCompletionItem *items;
} LSPResponseCompletion;
+typedef struct {
+ LSPString label;
+ LSPString documentation;
+ // NOTE: LSP gives us parameter information for *all*
+ // parameters, but we only really need it for the active parameter.
+
+ // (UTF-16) indices into `label` indicating which
+ // part of it should be highlighted for the active parameter
+ u16 active_start;
+ u16 active_end;
+ // documentation for the active parameter
+ LSPString active_documentation;
+} LSPSignatureInformation;
+
+typedef struct {
+ // NOTE: the "active" signature will be the first one
+ // in this array.
+ LSPSignatureInformation *signatures;
+} LSPResponseSignatureHelp;
+
typedef LSPRequestType LSPResponseType;
typedef struct {
@@ -255,6 +275,7 @@ typedef struct {
char *string_data;
union {
LSPResponseCompletion completion;
+ LSPResponseSignatureHelp signature_help;
} data;
} LSPResponse;