From 7ea1d52a5f0e08fdeeea9e262fec9fde752d899d Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 19 May 2024 13:29:23 -0500 Subject: [PATCH] feat(nvim): add `nvim-window-picker` --- .../plugins/configs/nvim-window-picker.lua | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 users/price/dots/.config/nvim/lua/plugins/configs/nvim-window-picker.lua diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/nvim-window-picker.lua b/users/price/dots/.config/nvim/lua/plugins/configs/nvim-window-picker.lua new file mode 100644 index 00000000..59ca24dc --- /dev/null +++ b/users/price/dots/.config/nvim/lua/plugins/configs/nvim-window-picker.lua @@ -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, + }, + }, + }, +}