feat(nvim): add nvim-window-picker
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
This commit is contained in:
parent
3595540b6a
commit
7ea1d52a5f
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user