summaryrefslogtreecommitdiff
path: root/server/src/workspace.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-17 21:10:29 +0800
committersumneko <sumneko@hotmail.com>2019-04-17 21:10:29 +0800
commitb62070c2e217bd90a7c00fefd0167c1b828128fa (patch)
tree7b8d1683e783d93986da4171851ae6bf469209d6 /server/src/workspace.lua
parent1c0b098f9b722f775c75bd779d0327a1a431408e (diff)
downloadlua-language-server-b62070c2e217bd90a7c00fefd0167c1b828128fa.zip
修正 Lua.runtime.path 配置无效的bug
Diffstat (limited to 'server/src/workspace.lua')
-rw-r--r--server/src/workspace.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua
index ef449e1a..69ae54ec 100644
--- a/server/src/workspace.lua
+++ b/server/src/workspace.lua
@@ -334,7 +334,7 @@ function mt:createCompiler(str)
end
function mt:compileLuaPath()
- for i, luapath in ipairs(self.luapath) do
+ for i, luapath in ipairs(config.config.runtime.path) do
self.pathMatcher[i] = self:createCompiler(luapath)
end
end
@@ -419,7 +419,7 @@ function mt:searchPath(baseUri, str)
end
str = str:gsub('%.', '/')
local searchers = {}
- for i, luapath in ipairs(self.luapath) do
+ for i, luapath in ipairs(config.config.runtime.path) do
searchers[i] = luapath:gsub('%?', str)
end
@@ -471,11 +471,6 @@ return function (lsp, name)
files = {},
searched = {},
loaded = {},
- luapath = {
- '?.lua',
- '?/init.lua',
- '?/?.lua',
- },
pathMatcher = {}
}, mt)
workspace:compileLuaPath()