summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-06-22 19:44:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-06-22 19:44:45 +0800
commit4ed6db9faaa9614489b0b724a0640792cc3fc454 (patch)
tree714c01a137738176cb64434377781cf819348305 /script
parentd98dcf00478af9d16397ab11fc5e47a24f534c04 (diff)
downloadlua-language-server-4ed6db9faaa9614489b0b724a0640792cc3fc454.zip
整理代码
Diffstat (limited to 'script')
-rw-r--r--script/workspace.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/script/workspace.lua b/script/workspace.lua
index 88d29431..8a7e4139 100644
--- a/script/workspace.lua
+++ b/script/workspace.lua
@@ -201,12 +201,10 @@ end
function mt:isLuaFile(path)
local pathStr = path:string()
for k, v in pairs(config.other.associations) do
- k = k:gsub('^%*', '')
- if self:fileNameEq(pathStr:sub(-#k), k) then
- if v == 'lua' then
+ if v == 'lua' then
+ k = k:gsub('^%*', '')
+ if self:fileNameEq(pathStr:sub(-#k), k) then
return true
- else
- return false
end
end
end