summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-02 16:21:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-02 16:21:34 +0800
commit0948c854de21e720c951c51c37d40b0ef8af980b (patch)
tree17af1359b5736475f692041e0334b70b3003c329 /script
parent35b712381cf91294629f85c8598055f6b5babf06 (diff)
downloadlua-language-server-0948c854de21e720c951c51c37d40b0ef8af980b.zip
update
Diffstat (limited to 'script')
-rw-r--r--script/provider/diagnostic.lua1
-rw-r--r--script/provider/provider.lua2
2 files changed, 3 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 29d01a6c..792412c0 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -373,6 +373,7 @@ end
files.watch(function (ev, uri)
if ev == 'remove' then
m.clear(uri)
+ m.refresh(uri)
elseif ev == 'update' then
if ws.isReady() then
m.refresh(uri)
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 550b7945..c3826a69 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -199,6 +199,7 @@ proto.on('workspace/didDeleteFiles', function (params)
files.remove(file.uri)
local childs = files.getChildFiles(file.uri)
for _, uri in ipairs(childs) do
+ log.debug('workspace/didDeleteFiles#child', uri)
files.remove(uri)
end
end
@@ -220,6 +221,7 @@ proto.on('workspace/didRenameFiles', function (params)
local ouri = files.getOriginUri(uri)
local tail = ouri:sub(#file.oldUri)
local nuri = file.newUri .. tail
+ log.debug('workspace/didRenameFiles#child', ouri, nuri)
files.remove(uri)
files.setText(nuri, text, false)
end