diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-17 21:10:29 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-17 21:10:29 +0800 |
commit | b62070c2e217bd90a7c00fefd0167c1b828128fa (patch) | |
tree | 7b8d1683e783d93986da4171851ae6bf469209d6 /server/src | |
parent | 1c0b098f9b722f775c75bd779d0327a1a431408e (diff) | |
download | lua-language-server-b62070c2e217bd90a7c00fefd0167c1b828128fa.zip |
修正 Lua.runtime.path 配置无效的bug
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/workspace.lua | 9 |
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() |