summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/provider.lua')
-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