summaryrefslogtreecommitdiff
path: root/fnl/config/which-key.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-05-30 21:28:23 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-05-30 21:28:23 +0200
commitc76b54491dd13de34e4e3f144544506b1988df2c (patch)
treee6f9e3d153556e26de92191749f91be01ef3d9ce /fnl/config/which-key.fnl
parent0e12c63a0a32e79b9e6039934769e6060e20c8ab (diff)
Add window-picker
Diffstat (limited to 'fnl/config/which-key.fnl')
-rw-r--r--fnl/config/which-key.fnl8
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