aboutsummaryrefslogtreecommitdiff
path: root/fnl/plugins/which_key.fnl
blob: 6d4963f7181a5bddaf0091f201c33979d1713196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(local whichkey (require :which-key))
(whichkey.setup)

(macro wmap [k op desc]
  {1 (.. " " k) 2 op :desc desc})
(macro gmap [k group]
  {1 (.. " " k) :group group})

(local mappings [
  ;;common
  (wmap :f "<cmd>Neotree toggle<CR>" "fs")
  (wmap :w "<cmd>WinShift<CR>" "win shift")
  (wmap :t "<cmd>ToggleTerm direction=horizontal<CR>" "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)