Skip to content

Commit

Permalink
fix(sources): always load sources when not registered yet. Fixes #393
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 30, 2024
1 parent 398ac76 commit 1470302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/sources/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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")
if name and name ~= "init" and not M.sources[name] and package.loaded["trouble.sources." .. name] == nil then
if name and name ~= "init" and not M.sources[name] then
Util.try(function()
M.register(name)
end, { msg = "Error loading source: " .. name })
Expand Down

0 comments on commit 1470302

Please sign in to comment.