From 6267e5222d80aa0beb3a933676d3157c27a9d03f Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 2 May 2023 09:18:15 +0200 Subject: new keymap for make options, new snippet --- lua/config/keymaps.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lua/config/keymaps.lua') 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", "p", function() vim.fn.setreg('"', val) end, { desc = "Special paste, paste without replacing copy register content" }) +map("n", "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", "bd", ":bd!", { desc = "Deletes the current buffer" }) -map("n", "fz", function () +map("n", "fz", function() vim.cmd [[normal zfaf]] end, { desc = "Fold the function" }) -- cgit v1.2.3