diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-05-30 21:28:23 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-05-30 21:28:23 +0200 |
| commit | c76b54491dd13de34e4e3f144544506b1988df2c (patch) | |
| tree | e6f9e3d153556e26de92191749f91be01ef3d9ce /fnl/config/which-key.fnl | |
| parent | 0e12c63a0a32e79b9e6039934769e6060e20c8ab (diff) | |
Add window-picker
Diffstat (limited to 'fnl/config/which-key.fnl')
| -rw-r--r-- | fnl/config/which-key.fnl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 70080b7..db9f4f4 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -1,5 +1,5 @@ ;; Which-key provides a pop-up meny for some key mappings. -(module config.which-key {autoload {util util}}) +(module config.which-key {autoload {util util nvim aniseed.nvim}}) (def- setup {:plugins {:marks true :registers true @@ -110,6 +110,12 @@ "Replace Word"] :f ["<cmd>lua require('spectre').open_file_search()<cr>" "Replace Buffer"]} + :w [(fn switch-window [] + (let [window-picker (require :window-picker)] + (let [win (window-picker.pick_window)] + (if (not= win nil) + (nvim.set_current_win win))))) + "Switch window"] :T {:name :Treesitter :p [:<cmd>TSPlaygroundToggle<cr> :Playground]}}) (def- vopts {:mode :v |