Skip to content

Commit

Permalink
feat(helptags): include lazy.nvim's unloaded rtp (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Jun 24, 2024
1 parent 1ec6eed commit 3b070d0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/fzf-lua/providers/helptags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ local fzf_fn = function(cb)
end

local help_files = {}
local all_files = vim.fn.globpath(vim.o.runtimepath, "doc/*", 1, 1)
local rtp = vim.o.runtimepath
-- If using lazy.nvim, get all the lazy loaded plugin paths (#1296)
local lazy = package.loaded["lazy.core.util"]
if lazy and lazy.get_unloaded_rtp then
local paths = lazy.get_unloaded_rtp("")
rtp = rtp .. "," .. table.concat(paths, ",")
end
local all_files = vim.fn.globpath(rtp, "doc/*", 1, 1)
for _, fullpath in ipairs(all_files) do
local file = path.tail(fullpath)
if file == "tags" then
Expand Down

0 comments on commit 3b070d0

Please sign in to comment.