summaryrefslogtreecommitdiff
path: root/fnl/config
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/config')
-rw-r--r--fnl/config/init.fnl1
-rw-r--r--fnl/config/which-key.fnl8
-rw-r--r--fnl/config/window-picker.fnl7
3 files changed, 15 insertions, 1 deletions
diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl
index e4785e5..7c49270 100644
--- a/fnl/config/init.fnl
+++ b/fnl/config/init.fnl
@@ -20,4 +20,5 @@
config.which-key
config.zen
config.trim
+ config.window-picker
config.lsp]})
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
diff --git a/fnl/config/window-picker.fnl b/fnl/config/window-picker.fnl
new file mode 100644
index 0000000..51d7fb4
--- /dev/null
+++ b/fnl/config/window-picker.fnl
@@ -0,0 +1,7 @@
+;; Trim whitespaces on save.
+(module config.window-picker {autoload {util util}})
+
+(let [window-picker (util.load-plugin :window-picker)]
+ (window-picker.setup {:other_win_hl_color "#171717"
+ :fg_color "#E1E1E1"
+ :selection_chars :MNEIOARSTG}))