From ec2ecd2dd0f15ac85a1ceec4094cdd61c75029fb Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 28 Jan 2024 00:18:27 -0600 Subject: [PATCH] refactor(nvim): define hurl commands in ftplugin --- dots/.config/nvim/after/ftplugin/hurl.lua | 24 +++++++++++++++++++ .../.config/nvim/lua/plugins/configs/hurl.lua | 8 ------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dots/.config/nvim/after/ftplugin/hurl.lua b/dots/.config/nvim/after/ftplugin/hurl.lua index e69de29b..7594a6b7 100644 --- a/dots/.config/nvim/after/ftplugin/hurl.lua +++ b/dots/.config/nvim/after/ftplugin/hurl.lua @@ -0,0 +1,24 @@ +vim.keymap.set("n", "fr", "Hurl", { + buffer = true, +}) + +vim.opt_local.commentstring = "# %s" + +vim.keymap.set("n", "fr", "HurlRunner", { + desc = "Hurl: Runner" +}) +vim.keymap.set("n", "fa", "HurlRunnerAt", { + desc = "Hurl: Run Api request" +}) +vim.keymap.set("n", "fe", "HurlRunnerToEntry", { + desc = "Hurl: Run Api request to entry" +}) +vim.keymap.set("n", "fm", "HurlToggleMode", { + desc = "Hurl: Toggle Mode" +}) +vim.keymap.set("n", "rv", "HurlVerbose", { + desc = "Hurl: Run Api in verbose mode" +}) +vim.keymap.set("v", "fr", ":HurlRunner", { + desc = "Hurl: Runner" +}) diff --git a/dots/.config/nvim/lua/plugins/configs/hurl.lua b/dots/.config/nvim/lua/plugins/configs/hurl.lua index 6cce8eff..73b025d9 100644 --- a/dots/.config/nvim/lua/plugins/configs/hurl.lua +++ b/dots/.config/nvim/lua/plugins/configs/hurl.lua @@ -15,13 +15,5 @@ return { }, }, }, - keys = { - { "fr", "HurlRunner", desc = "Hurl: Runner" }, - { "fa", "HurlRunnerAt", desc = "Hurl: Run Api request" }, - { "fe", "HurlRunnerToEntry", desc = "Hurl: Run Api request to entry" }, - { "fm", "HurlToggleMode", desc = "Hurl: Toggle Mode" }, - { "rv", "HurlVerbose", desc = "Hurl: Run Api in verbose mode" }, - { "fr", ":HurlRunner", desc = "Hurl: Runner", mode = "v" }, - }, } }