summaryrefslogtreecommitdiff
path: root/script/workspace/workspace.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-01-23 03:43:08 +0800
committersumneko <sumneko@hotmail.com>2022-01-23 03:43:08 +0800
commit1c8095439f8d738390b3cc19fa3f82853dd89f95 (patch)
tree2416df47fe8364ddf49b9ae43dc0de00d4f84f17 /script/workspace/workspace.lua
parente5ef01c23e250a869e2e023ba83de1f5a28feb97 (diff)
downloadlua-language-server-1c8095439f8d738390b3cc19fa3f82853dd89f95.zip
fix test
Diffstat (limited to 'script/workspace/workspace.lua')
-rw-r--r--script/workspace/workspace.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index e064b424..5277f38e 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -250,9 +250,8 @@ end
---@async
---@param scp scope
function m.awaitPreload(scp)
- local displayedUri = scp.uri or '<fallback>'
- await.close('preload:' .. displayedUri)
- await.setID('preload:' .. displayedUri)
+ await.close('preload:' .. scp:getName())
+ await.setID('preload:' .. scp:getName())
await.sleep(0.1)
local watchers = scp:get 'watchers'
@@ -267,13 +266,13 @@ function m.awaitPreload(scp)
local ld <close> = loading.create(scp)
scp:set('loading', ld)
- log.info('Preload start:', displayedUri)
+ log.info('Preload start:', scp:getName())
local native = m.getNativeMatcher(scp)
local librarys = m.getLibraryMatchers(scp)
if scp.uri then
- log.info('Scan files at:', displayedUri)
+ log.info('Scan files at:', scp:getName())
---@async
native:scan(furi.decode(scp.uri), function (path)
ld:loadFile(furi.encode(path))
@@ -289,9 +288,9 @@ function m.awaitPreload(scp)
watchers[#watchers+1] = fw.watch(furi.decode(libMatcher.uri))
end
- log.info(('Found %d files at:'):format(ld.max), displayedUri)
+ log.info(('Found %d files at:'):format(ld.max), scp:getName())
ld:loadAll()
- log.info('Preload finish at:', displayedUri)
+ log.info('Preload finish at:', scp:getName())
end
--- 查找符合指定file path的所有uri