diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-11 00:41:17 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-01-11 00:41:17 +0100 |
commit | f318452070d42e51231f7880a5d0eaa93d978a1e (patch) | |
tree | c76f35889ebc7a4e52bbd06e07c8f33f9bf68f5d /fnl/plugins/window-picker.fnl | |
parent | 433952cf3efa8e2b5e23ff0e76a4afe6f95d44b5 (diff) |
Rip aniseed, hail hotpot
Diffstat (limited to 'fnl/plugins/window-picker.fnl')
-rw-r--r-- | fnl/plugins/window-picker.fnl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fnl/plugins/window-picker.fnl b/fnl/plugins/window-picker.fnl new file mode 100644 index 0000000..2820409 --- /dev/null +++ b/fnl/plugins/window-picker.fnl @@ -0,0 +1,19 @@ +;; Trim whitespaces on save. + +(fn pick-window [opts] + (let [window-picker (require :window-picker)] + (let [win (window-picker.pick_window)] + (if (not= win nil) + (vim.api.nvim_set_current_win win))))) + +{1 :s1n7ax/nvim-window-picker + :event :BufReadPost + :opts {:other_win_hl_color "#171717" + :fg_color "#E1E1E1" + :selection_chars :MNEIOARSTG} + :config (lambda [_ opts] + (let [window-picker (require :window-picker)] + (window-picker.setup opts) + (vim.keymap.set :n :<C-s> + (fn [] + (pick-window)) {})))} |