Skip to content

Commit

Permalink
fix(helptags): validate lazy plugin (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Jul 19, 2024
1 parent eede89a commit fb058bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/fzf-lua/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,9 @@ local function helptags(s, opts)
local entry = path.entry_to_file(x, opts)
if entry and entry.path and package.loaded.lazy then
-- make sure the plugin is loaded. This won't do anything if already loaded
local lazyConfig = require("lazy.core.config")
local _, plugin = path.normalize(entry.path):match("(/([^/]+)/doc/)")
if plugin then
if plugin and lazyConfig.plugins[plugin] then
require("lazy").load({ plugins = { plugin } })
end
end
Expand Down

0 comments on commit fb058bd

Please sign in to comment.