mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(picker.help): make sure plugin is loaded for which we want to view the help
This commit is contained in:
parent
ffdbcd6a88
commit
3841a8705a
1 changed files with 8 additions and 0 deletions
|
@ -519,6 +519,14 @@ function M.help(picker, item, action)
|
|||
---@cast action snacks.picker.jump.Action
|
||||
if item then
|
||||
picker:close()
|
||||
local file = Snacks.picker.util.path(item) or ""
|
||||
if package.loaded.lazy then
|
||||
local plugin = file:match("/([^/]+)/doc/")
|
||||
if plugin then
|
||||
require("lazy").load({ plugins = { plugin } })
|
||||
end
|
||||
end
|
||||
|
||||
local cmd = "help " .. item.text
|
||||
if action.cmd == "vsplit" then
|
||||
cmd = "vert " .. cmd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue