From f7aa7d0be200cc6778ce3fa92eb6eadfa3629de6 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Sun, 4 Dec 2022 15:10:52 +0100 Subject: [PATCH] lsp: Support change events with no range range is optional https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent --- blueprintcompiler/lsp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blueprintcompiler/lsp.py b/blueprintcompiler/lsp.py index 26a519e..f579ab4 100644 --- a/blueprintcompiler/lsp.py +++ b/blueprintcompiler/lsp.py @@ -51,6 +51,9 @@ class OpenFile: def apply_changes(self, changes): for change in changes: + if "range" not in change: + self.text = change["text"] + continue start = utils.pos_to_idx( change["range"]["start"]["line"], change["range"]["start"]["character"],