summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-02 13:20:16 -0500
committerpommicket <pommicket@gmail.com>2023-01-02 13:20:16 -0500
commit1dc24e79ec7cf80e06b9c4e7cc55e18857b624c1 (patch)
tree9537660776906e08d5b4f511926bf4a1c8f4c644 /lsp-write.c
parent9844c679b4a4fb42c97f80e5653dea7c73ff0edf (diff)
restructure LSP stuff
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 3c2c11a..1a1093c 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -1,3 +1,6 @@
+#define LSP_INTERNAL 1
+#include "lsp.h"
+
#define write_bool lsp_write_bool // prevent naming conflict
static const char *lsp_language_id(Language lang) {
@@ -363,7 +366,7 @@ static void write_symbol_kind_support(JSONWriter *o) {
// NOTE: don't call lsp_request_free after calling this function.
// I will do it for you.
-static void write_request(LSP *lsp, LSPRequest *request) {
+void write_request(LSP *lsp, LSPRequest *request) {
JSONWriter writer = message_writer_new(lsp);
JSONWriter *o = &writer;
@@ -660,7 +663,7 @@ static void write_response(LSP *lsp, LSPResponse *response) {
lsp_response_free(response);
}
-static void write_message(LSP *lsp, LSPMessage *message) {
+void write_message(LSP *lsp, LSPMessage *message) {
switch (message->type) {
case LSP_REQUEST:
write_request(lsp, &message->u.request);