aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-05-02 09:18:15 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-05-02 09:18:31 +0200
commit6267e5222d80aa0beb3a933676d3157c27a9d03f (patch)
tree1491cc4289fef1e86fae7db70a75ae42d48f50bf /lua
parent68e29799b41ba4db8ea06d111c4687f4a500942e (diff)
downloadnvim-conf-6267e5222d80aa0beb3a933676d3157c27a9d03f.tar.gz
nvim-conf-6267e5222d80aa0beb3a933676d3157c27a9d03f.zip
new keymap for make options, new snippet
Diffstat (limited to 'lua')
-rw-r--r--lua/alpha/snips/ft/cucumber.lua7
-rw-r--r--lua/config/keymaps.lua15
2 files changed, 21 insertions, 1 deletions
diff --git a/lua/alpha/snips/ft/cucumber.lua b/lua/alpha/snips/ft/cucumber.lua
index cb74586..6176a87 100644
--- a/lua/alpha/snips/ft/cucumber.lua
+++ b/lua/alpha/snips/ft/cucumber.lua
@@ -9,6 +9,13 @@ local M = {
all = t [[And all stubs should be matched]],
status_code = fmt([[Then the response status code should be {}]], { i(1, "200") }),
no_error = t [[And the JSON path expression errors should not have result]],
+ json_data = fmt([[And the JSON path expression "data" should be equal to:
+"""
+{{
+ {}
+}}
+"""
+ ]], {i(1)}),
feature = fmt(
[[Feature: {}
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" })