summaryrefslogtreecommitdiff
path: root/lsp.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-01 17:28:30 -0500
committerpommicket <pommicket@gmail.com>2023-03-01 17:28:30 -0500
commit6d9ebc8332b6cc54ada4bc17689e4de4040892c6 (patch)
tree3d8611141759be315996b537e8b533a16aa472a5 /lsp.h
parent52ba910a48a4dd2abb798c3c998ecb0e006c1895 (diff)
start dynamic lbanguage registaration
Diffstat (limited to 'lsp.h')
-rw-r--r--lsp.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lsp.h b/lsp.h
index efaca11..2ebcce4 100644
--- a/lsp.h
+++ b/lsp.h
@@ -111,7 +111,7 @@ typedef struct {
} LSPRequestCancel;
typedef struct {
- Language language;
+ u64 language;
LSPDocumentID document;
// freed by lsp_request_free
char *file_contents;
@@ -587,6 +587,8 @@ typedef struct LSP {
char error[512];
} LSP;
+/// Assiociate `id` with the LSP language identifier `lsp_identifier` (see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#-textdocumentitem-)
+void lsp_register_language(u64 id, const char *lsp_identifier);
// returns true if there's an error.
// returns false and sets error to "" if there's no error.
// if clear = true, the error will be cleared.