commit e5cd5a9306e9782480b44d5a5b9140bfa70e1f1a parent f0ec0bc58b56564477df02803c20f62ae5b7c9ba Author: Tomas Nemec <nemi@skaut.cz> Date: Thu, 9 Sep 2021 11:40:41 +0200 update Diffstat:
M | lua/tms/ws/file_pairs.lua | | | 9 | ++------- |
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/lua/tms/ws/file_pairs.lua b/lua/tms/ws/file_pairs.lua @@ -20,13 +20,8 @@ M.config = function() if event == 'stdout' then if #data > 1 then for _, file in ipairs(data) do - if file:find('html$') then - files.html = file - elseif file:find('scss$') then - files.scss = file - elseif file:find('dart$') then - files.dart = file - end + local _, _, ext = file:match('(.-)([^\\/]-%.?([^%.\\/]*))$') + files[ext] = file end end end