summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-04 18:13:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-04 18:13:19 +0800
commitd72505593952571e27e70a6f81f5db515653e8ee (patch)
treec8fcf9b22ba78dfe3b23424e0aa22952b66cd25e /script/provider
parentea009881054fe774a59f440db8da15ce0425a464 (diff)
downloadlua-language-server-d72505593952571e27e70a6f81f5db515653e8ee.zip
print error of plugin;check ignore
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 71649a2f..4db7c3c1 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -173,7 +173,9 @@ proto.on('workspace/didChangeWatchedFiles', function (params)
end
elseif change.type == define.FileChangeType.Changed then
-- 如果文件处于关闭状态,则立即更新;否则等待didChange协议来更新
- if files.isLua(uri) and not files.isOpen(uri) then
+ if files.isLua(uri)
+ and not files.isOpen(uri)
+ and not workspace.isIgnored(uri) then
plugin.awaitReady()
files.setText(uri, pub.awaitTask('loadFile', uri), false)
else