summaryrefslogtreecommitdiff
path: root/server/src/workspace.lua
diff options
context:
space:
mode:
authorunknown <sumnekosun@intranet.123u.com>2019-04-01 18:55:51 +0800
committerunknown <sumnekosun@intranet.123u.com>2019-04-01 18:55:51 +0800
commitc0708092a2c256d61c2cdbc3217a588bb86757ca (patch)
treebcdf65d29ec7f3b950090d2f0102d22eefbac4e1 /server/src/workspace.lua
parenta66a4c54ef9421f0ba5683cd727a40197078d724 (diff)
downloadlua-language-server-c0708092a2c256d61c2cdbc3217a588bb86757ca.zip
定义与引用会进行更多的尝试
Diffstat (limited to 'server/src/workspace.lua')
-rw-r--r--server/src/workspace.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua
index d03fc217..4ab8b6d2 100644
--- a/server/src/workspace.lua
+++ b/server/src/workspace.lua
@@ -104,12 +104,13 @@ function mt:scanFiles()
log.info('忽略文件:\r\n' .. table.concat(ignored, '\r\n'))
log.info('开始扫描文件任务')
local compiled = {}
+ local count = 0
self._scanRequest = async.run('scanfiles', {
root = self.root:string(),
ignored = ignored,
}, function (mode, ...)
if mode == 'ok' then
- log.info('扫描文件任务完成')
+ log.info('扫描文件任务完成,共', count, '个文件。')
self._complete = true
self._scanRequest = nil
self:reset()
@@ -123,6 +124,7 @@ function mt:scanFiles()
local uri = self:uriEncode(path)
self.files[name] = uri
self.lsp:readText(uri, path, file.buf, compiled)
+ count = count + 1
elseif mode == 'stop' then
log.info('扫描文件任务中断')
return false