Check if nvim-window-picker is installed before registering auto command

This commit is contained in:
Aietes 2024-12-01 22:52:09 +01:00
parent 4b80c3c300
commit 53a71c0e86
No known key found for this signature in database

View file

@ -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,
}