summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-06-22 20:22:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-06-22 20:22:31 +0800
commit3c4203ac592c00fa8f3072faf77e1966149a7860 (patch)
tree2fde9c1c7bcfa3f2905bbb7f141a94c35334d8b1
parent4ed6db9faaa9614489b0b724a0640792cc3fc454 (diff)
downloadlua-language-server-3c4203ac592c00fa8f3072faf77e1966149a7860.zip
fix #174
-rw-r--r--script/method/initialized.lua4
-rw-r--r--script/workspace.lua2
2 files changed, 1 insertions, 5 deletions
diff --git a/script/method/initialized.lua b/script/method/initialized.lua
index 9e37fb37..ee1cbfc4 100644
--- a/script/method/initialized.lua
+++ b/script/method/initialized.lua
@@ -3,9 +3,7 @@ local rpc = require 'rpc'
--- @param lsp LSP
--- @return boolean
return function (lsp)
- local ws = lsp.workspaces[1]
-
- if ws then
+ for _, ws in ipairs(lsp.workspaces) do
-- 请求工作目录
local uri = ws.uri
-- 请求配置
diff --git a/script/workspace.lua b/script/workspace.lua
index 8a7e4139..75bc27a0 100644
--- a/script/workspace.lua
+++ b/script/workspace.lua
@@ -190,8 +190,6 @@ function mt:init(rootUri)
local logPath = ROOT / 'log' / (rootUri:gsub('[/:]+', '_') .. '.log')
log.info('Log path: ', logPath)
log.init(ROOT, logPath)
-
- self:scanFiles()
end
function mt:isComplete()