feat(nvim): add nvim-window-picker
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled

This commit is contained in:
Price Hiller 2024-05-19 13:29:23 -05:00
parent 3595540b6a
commit 7ea1d52a5f
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -0,0 +1,36 @@
return {
{
"s1n7ax/nvim-window-picker",
name = "window-picker",
opts = {
hint = "floating-big-letter",
---@param window_ids integer[]
filter_func = function(window_ids)
return vim.iter(window_ids)
:filter(function(win_id)
local win_type = vim.fn.win_gettype(win_id)
return not vim.list_contains({
"preview",
"unknown",
"popup",
"command",
}, win_type)
end)
:totable()
end,
bo = {
buftype = {},
},
show_prompt = false,
},
keys = {
{
"F",
function()
local win_id = require("window-picker").pick_window() or vim.api.nvim_get_current_win()
vim.api.nvim_set_current_win(win_id)
end,
},
},
},
}