refactor(nvim): define hurl commands in ftplugin
This commit is contained in:
parent
c847748fee
commit
ec2ecd2dd0
@ -0,0 +1,24 @@
|
||||
vim.keymap.set("n", "<leader>fr", "<Cmd>Hurl<CR>", {
|
||||
buffer = true,
|
||||
})
|
||||
|
||||
vim.opt_local.commentstring = "# %s"
|
||||
|
||||
vim.keymap.set("n", "<leader>fr", "<cmd>HurlRunner<CR>", {
|
||||
desc = "Hurl: Runner"
|
||||
})
|
||||
vim.keymap.set("n", "<leader>fa", "<cmd>HurlRunnerAt<CR>", {
|
||||
desc = "Hurl: Run Api request"
|
||||
})
|
||||
vim.keymap.set("n", "<leader>fe", "<cmd>HurlRunnerToEntry<CR>", {
|
||||
desc = "Hurl: Run Api request to entry"
|
||||
})
|
||||
vim.keymap.set("n", "<leader>fm", "<cmd>HurlToggleMode<CR>", {
|
||||
desc = "Hurl: Toggle Mode"
|
||||
})
|
||||
vim.keymap.set("n", "<leader>rv", "<cmd>HurlVerbose<CR>", {
|
||||
desc = "Hurl: Run Api in verbose mode"
|
||||
})
|
||||
vim.keymap.set("v", "<leader>fr", ":HurlRunner<CR>", {
|
||||
desc = "Hurl: Runner"
|
||||
})
|
@ -15,13 +15,5 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>fr", "<cmd>HurlRunner<CR>", desc = "Hurl: Runner" },
|
||||
{ "<leader>fa", "<cmd>HurlRunnerAt<CR>", desc = "Hurl: Run Api request" },
|
||||
{ "<leader>fe", "<cmd>HurlRunnerToEntry<CR>", desc = "Hurl: Run Api request to entry" },
|
||||
{ "<leader>fm", "<cmd>HurlToggleMode<CR>", desc = "Hurl: Toggle Mode" },
|
||||
{ "<leader>rv", "<cmd>HurlVerbose<CR>", desc = "Hurl: Run Api in verbose mode" },
|
||||
{ "<leader>fr", ":HurlRunner<CR>", desc = "Hurl: Runner", mode = "v" },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user