From 1d19a5fe136ef0f888ec1b186650f7b42adc7628 Mon Sep 17 00:00:00 2001 From: dbger <3982742+dbger@users.noreply.github.com> Date: Fri, 29 Mar 2024 18:47:34 +0800 Subject: [PATCH] fix(windows): Corrected regex matching path with backslash. (#396) --- lua/trouble/sources/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/trouble/sources/init.lua b/lua/trouble/sources/init.lua index 71ae7026..5ae9f0e8 100644 --- a/lua/trouble/sources/init.lua +++ b/lua/trouble/sources/init.lua @@ -51,7 +51,7 @@ end function M.load() local rtp = vim.api.nvim_get_runtime_file("lua/trouble/sources/*.lua", true) for _, file in ipairs(rtp) do - local name = file:match("lua/trouble/sources/(.*)%.lua") + local name = file:match("lua[/\\]trouble[/\\]sources[/\\](.*)%.lua") if name and name ~= "init" and not M.sources[name] then Util.try(function() M.register(name)