aboutsummaryrefslogtreecommitdiffstats
path: root/lua/config/keymaps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/config/keymaps.lua')
-rw-r--r--lua/config/keymaps.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua
index f5c0248..af7e505 100644
--- a/lua/config/keymaps.lua
+++ b/lua/config/keymaps.lua
@@ -6,9 +6,22 @@ map("v", "<leader>p", function()
vim.fn.setreg('"', val)
end, { desc = "Special paste, paste without replacing copy register content" })
+map("n", "<leader>mm", function()
+ local items =
+ vim.fn.systemlist "make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\\/\t=]*:([^=]|$)/ {split($1,A,/ /);print A[1]}'"
+
+ vim.ui.select(items, { promt = "Make command" }, function(choice)
+ if not choice then
+ return
+ end
+
+ require("harpoon.term").sendCommand(1, "make " .. choice)
+ end)
+end)
+
map("n", "<leader>bd", ":bd!<CR>", { desc = "Deletes the current buffer" })
-map("n", "<leader>fz", function ()
+map("n", "<leader>fz", function()
vim.cmd [[normal zfaf]]
end, { desc = "Fold the function" })