summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-02-04 03:05:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-02-04 03:05:39 +0800
commitd346cf40428b2a4320e51f643687764552657cac (patch)
treec00100daae89db56cb7b71f6e63c8772af609c0e /script/workspace
parent84db71d88151312ec3ce5474c43a9a5d70a9b45a (diff)
downloadlua-language-server-d346cf40428b2a4320e51f643687764552657cac.zip
skip more files
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/loading.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua
index eff55e6c..5ddc4bda 100644
--- a/script/workspace/loading.lua
+++ b/script/workspace/loading.lua
@@ -94,6 +94,10 @@ function mt:loadFile(uri, libraryUri)
if not content then
return
end
+ if files.getFile(uri) then
+ log.info(('Skip loaded file: %s'):format(uri))
+ return
+ end
log.info(('Preload file at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
--await.wait(function (waker)
-- self._sets[#self._sets+1] = waker
@@ -129,6 +133,10 @@ function mt:loadFile(uri, libraryUri)
if not content then
return
end
+ if files.getFile(uri) then
+ log.info(('Skip loaded file: %s'):format(uri))
+ return
+ end
log.info(('Preload dll at: %s , size = %.3f KB'):format(uri, #content / 1024.0))
--await.wait(function (waker)
-- self._sets[#self._sets+1] = waker