summaryrefslogtreecommitdiff
path: root/lsp-write.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-09 23:01:55 -0400
committerpommicket <pommicket@gmail.com>2023-09-09 23:02:10 -0400
commit7185635a553d44b537d6fd1264ceedf421e114ef (patch)
tree826a9f66fb47947b0288eea92d153c3b165a4859 /lsp-write.c
parentc9c4b74376017b52a024705622c42d7d35c5bda0 (diff)
deal with LSP servers that don't support incremental sync
this was the problem with godot
Diffstat (limited to 'lsp-write.c')
-rw-r--r--lsp-write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c
index 050d784..0eed987 100644
--- a/lsp-write.c
+++ b/lsp-write.c
@@ -547,7 +547,8 @@ void write_request(LSP *lsp, LSPRequest *request) {
arr_foreach_ptr(change->changes, LSPDocumentChangeEvent, event) {
write_arr_elem(o);
write_obj_start(o);
- write_key_range(o, "range", event->range);
+ if (event->use_range)
+ write_key_range(o, "range", event->range);
write_key_string(o, "text", lsp_request_string(request, event->text));
write_obj_end(o);
}