aboutsummaryrefslogtreecommitdiff
path: root/fnl/plugins/which_key.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/which_key.fnl')
-rw-r--r--fnl/plugins/which_key.fnl30
1 files changed, 29 insertions, 1 deletions
diff --git a/fnl/plugins/which_key.fnl b/fnl/plugins/which_key.fnl
index 6d4963f..e3279db 100644
--- a/fnl/plugins/which_key.fnl
+++ b/fnl/plugins/which_key.fnl
@@ -1,4 +1,4 @@
-(local whichkey (require :which-key))
+(local whichkey (_G.util.require! :which-key))
(whichkey.setup)
(macro wmap [k op desc]
@@ -11,11 +11,39 @@
(wmap :f "<cmd>Neotree toggle<CR>" "fs")
(wmap :w "<cmd>WinShift<CR>" "win shift")
(wmap :t "<cmd>ToggleTerm direction=horizontal<CR>" "hterm")
+ (wmap :d "<cmd>Glance references<CR>" "references")
+ (wmap :s "<cmd>Telescope live_grep<CR>" "search")
+ (wmap :b "<cmd>JABSOpen<CR>" "buffers")
+ (wmap :g (fn []
+ (local buffer (vim.fn.expand :%))
+ (vim.cmd "w") ;write so location is updated
+ (vim.cmd "tabe")
+ (vim.cmd (.. "buffer " buffer))
+ ((. (require "dapui") :open))) "dap-ify")
+ (wmap :x "<cmd>tabclose<CR>" "close tab")
+ (wmap :c (fn []
+ (_G.loaded.edgy.goto_main)
+ (vim.cmd "DiffviewOpen")) "git diff")
+
+ ;;layouts
+ (gmap :l "layout")
+ (wmap :li (fn []
+ (vim.cmd "ToggleTerm direction=horizontal")
+ (vim.cmd "Neotree toggle")
+ (vim.cmd "Outline")) "ide")
+
+ ;;visual
+ (gmap :v "visual")
+ (wmap :vl "<cmd>lua require('nabla').toggle_virt({autogen=true})<CR>" "latex")
+ (wmap :vb "<cmd>lua require('nvim-biscuits').toggle_biscuits()<CR>" "biscuits")
;;quick
(gmap :q "quick")
(wmap :qs "\"+y" "system grab")
(wmap :ql "0v$" "line")
+ (wmap :qr "<cmd>SnipRun<CR>" "run highlighted")
+ (wmap :qf "<cmd>RunFile<CR>" "run file")
+ (wmap :qe "<cmd>RunCode<CR>" "run code")
])
(tset mappings :mode [:n :v])