From 91af9255c1ff9ec072d4505194675386753c21db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 15 Jul 2021 16:37:33 +0800 Subject: always trust `'textDocument/didChange` --- script/provider/provider.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/script/provider/provider.lua b/script/provider/provider.lua index b68300a9..8a500443 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -213,9 +213,6 @@ proto.on('textDocument/didOpen', function (params) local text = doc.text log.debug('didOpen', uri) files.open(uri) - if not files.isOpen(uri) then - return - end files.setText(uri, text, true) end) @@ -234,9 +231,6 @@ proto.on('textDocument/didChange', function (params) local doc = params.textDocument local changes = params.contentChanges local uri = doc.uri - if not files.isLua(uri) and not files.isOpen(uri) then - return - end --log.debug('changes', util.dump(changes)) local text = tm(uri, changes) files.setText(uri, text, true) -- cgit v1.2.3