diff options
author | pommicket <pommicket@gmail.com> | 2022-12-27 23:15:27 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-27 23:15:27 -0500 |
commit | 47adb1651d35dcc545850916c4a16b747901dba5 (patch) | |
tree | f329f973016d15f17b0437202c26f4ca93a0b7be /lsp.h | |
parent | e112a90ff73f7f407ed2251f905565713c237bc1 (diff) |
more signature help
Diffstat (limited to 'lsp.h')
-rw-r--r-- | lsp.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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; |