From 128bb9acbce77e20473857345b0956739e8b6fca Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 23 Oct 2024 03:36:33 -0500 Subject: matchparen and which-key mappings --- fnl/plugins/matchparen.fnl | 1 + fnl/plugins/which_key.fnl | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 fnl/plugins/matchparen.fnl (limited to 'fnl/plugins') diff --git a/fnl/plugins/matchparen.fnl b/fnl/plugins/matchparen.fnl new file mode 100644 index 0000000..1154b31 --- /dev/null +++ b/fnl/plugins/matchparen.fnl @@ -0,0 +1 @@ +((. (require :matchparen) :setup)) diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl index 959e0a6..6d4963f 100644 --- a/fnl/plugins/which_key.fnl +++ b/fnl/plugins/which_key.fnl @@ -1,14 +1,27 @@ (local whichkey (require :which-key)) (whichkey.setup) -(local mappings { - 1 {1 " f" 2 "Neotree toggle" :desc "fs"} - 2 {1 " w" 2 "WinShift" :desc "win shift"} - 3 {1 " t" 2 "ToggleTerm direction=horizontal" :desc "hterm"} - - :mode [:n :v] - :silent true - :noremap true - :nowait true}) +(macro wmap [k op desc] + {1 (.. " " k) 2 op :desc desc}) +(macro gmap [k group] + {1 (.. " " k) :group group}) + +(local mappings [ + ;;common + (wmap :f "Neotree toggle" "fs") + (wmap :w "WinShift" "win shift") + (wmap :t "ToggleTerm direction=horizontal" "hterm") + + ;;quick + (gmap :q "quick") + (wmap :qs "\"+y" "system grab") + (wmap :ql "0v$" "line") + ]) + +(tset mappings :mode [:n :v]) +(tset mappings :silent true) +(tset mappings :noremap true) +(tset mappings :nowait true) + (whichkey.add mappings) -- cgit v1.2.3