mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-14 06:38:49 +02:00
Check if nvim-window-picker is installed before registering auto command
This commit is contained in:
parent
4b80c3c300
commit
53a71c0e86
1 changed files with 33 additions and 30 deletions
|
@ -108,6 +108,8 @@ return {
|
|||
end,
|
||||
})
|
||||
|
||||
--- Allow to open the file in a picked window if nvim-window-picker is installed.
|
||||
if pcall(require, "window-picker") then
|
||||
--- Opens the file in a picked window.
|
||||
--- @param close boolean Whether to close the mini.files window after opening the file.
|
||||
local open_in_window = function(close)
|
||||
|
@ -141,5 +143,6 @@ return {
|
|||
end, { buffer = buf_id, desc = "Open file in window and close" })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue