From 447644c1284829aec11fa92dc53823165b8d956c Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 24 Jan 2024 16:00:53 -0600 Subject: [PATCH] feat(nvim): replace `hurl` plugin with more active one --- dots/.config/nvim/after/ftplugin/hurl.lua | 5 ---- .../.config/nvim/lua/plugins/configs/hurl.lua | 27 +++++++++++++++++++ .../nvim/lua/plugins/configs/treesitter.lua | 4 --- 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 dots/.config/nvim/lua/plugins/configs/hurl.lua diff --git a/dots/.config/nvim/after/ftplugin/hurl.lua b/dots/.config/nvim/after/ftplugin/hurl.lua index 31a69664..e69de29b 100644 --- a/dots/.config/nvim/after/ftplugin/hurl.lua +++ b/dots/.config/nvim/after/ftplugin/hurl.lua @@ -1,5 +0,0 @@ -vim.keymap.set("n", "fr", "Hurl", { - buffer = true, -}) - -vim.opt_local.commentstring = "# %s" diff --git a/dots/.config/nvim/lua/plugins/configs/hurl.lua b/dots/.config/nvim/lua/plugins/configs/hurl.lua new file mode 100644 index 00000000..6cce8eff --- /dev/null +++ b/dots/.config/nvim/lua/plugins/configs/hurl.lua @@ -0,0 +1,27 @@ +return { + { + "jellydn/hurl.nvim", + dependencies = { "MunifTanjim/nui.nvim" }, + ft = "hurl", + opts = { + debug = false, + mode = "split", + formatters = { + json = { 'jq' }, + html = { + 'prettier', + '--parser', + 'html', + }, + }, + }, + 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" }, + }, + } +} diff --git a/dots/.config/nvim/lua/plugins/configs/treesitter.lua b/dots/.config/nvim/lua/plugins/configs/treesitter.lua index 49ee6b44..cf282f13 100644 --- a/dots/.config/nvim/lua/plugins/configs/treesitter.lua +++ b/dots/.config/nvim/lua/plugins/configs/treesitter.lua @@ -118,10 +118,6 @@ return { event = { "BufReadPre", "BufNewFile", "WinLeave" }, dependencies = { "nvim-treesitter/playground", - { - "pfeiferj/nvim-hurl", - config = true, - }, "nvim-treesitter/nvim-treesitter-textobjects", "RRethy/nvim-treesitter-endwise", },