summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-03-08 14:16:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-03-08 14:16:33 +0800
commit82ec96f2bd63a1d691e919c668fb80b01a05a358 (patch)
tree974b214fdbff6b150b58dabe7970c780f88fb4ca /script
parent2db1aed64ea3e43d3ee3e8a1ee5a53b8c1d9d95d (diff)
downloadlua-language-server-82ec96f2bd63a1d691e919c668fb80b01a05a358.zip
#977 cleanup
Diffstat (limited to 'script')
-rw-r--r--script/files.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/script/files.lua b/script/files.lua
index 7ba45262..7bd96611 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -662,13 +662,10 @@ end
---@param uri uri
---@return boolean
function m.isLua(uri)
- local ext = uri:match '%.([^%.%/%\\]+)$'
- if not ext then
- return false
- end
- if ext == 'lua' then
+ if util.stringEndWith(uri:lower(), '.lua') then
return true
end
+ -- check customed assoc, e.g. `*.lua.txt = *.lua`
local matcher = m.getAssoc(uri)
local path = furi.decode(uri)
return matcher(path)