From 2a94573f54c69a9af7536586ab2c03eb88bda5e7 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Fri, 5 Jan 2024 01:50:20 +0100 Subject: Refactor --- fnl/plugins/window-picker.fnl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 fnl/plugins/window-picker.fnl (limited to 'fnl/plugins/window-picker.fnl') diff --git a/fnl/plugins/window-picker.fnl b/fnl/plugins/window-picker.fnl new file mode 100644 index 0000000..e396ce1 --- /dev/null +++ b/fnl/plugins/window-picker.fnl @@ -0,0 +1,19 @@ +;; Trim whitespaces on save. + +(local opts {:other_win_hl_color "#171717" + :fg_color "#E1E1E1" + :selection_chars :MNEIOARSTG}) + +(fn pick-window [] + (let [window-picker (require :window-picker)] + (let [win (window-picker.pick_window)] + (if (not= win nil) + (vim.api.nvim_set_current_win win))))) + +(fn config [] + (let [window-picker (require :window-picker)] + (window-picker.setup opts) + (vim.keymap.set :n : (fn [] + (pick-window)) {}))) + +{1 :s1n7ax/nvim-window-picker :event :BufReadPost :version :2.0.0 : config} -- cgit v1.2.3-70-g09d2