diff --git a/lua/plugins/hurl.lua b/lua/plugins/hurl.lua new file mode 100644 index 0000000..69926f7 --- /dev/null +++ b/lua/plugins/hurl.lua @@ -0,0 +1,36 @@ +return { + "jellydn/hurl.nvim", + dependencies = { + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + ft = "hurl", + opts = { + -- Show debugging info + debug = false, + -- Show notification on run + show_notification = false, + -- Show response in popup or split + mode = "split", + -- Default formatter + formatters = { + json = { "jq" }, -- Make sure you have install jq in your system, e.g: brew install jq + html = { + "prettier", -- Make sure you have install prettier in your system, e.g: npm install -g prettier + "--parser", + "html", + }, + }, + }, + keys = { + -- Run API request + { "A", "HurlRunner", desc = "Run All requests" }, + { "a", "HurlRunnerAt", desc = "Run Api request" }, + { "te", "HurlRunnerToEntry", desc = "Run Api request to entry" }, + { "tm", "HurlToggleMode", desc = "Hurl Toggle Mode" }, + { "tv", "HurlVerbose", desc = "Run Api in verbose mode" }, + -- Run Hurl request in visual mode + { "h", ":HurlRunner", desc = "Hurl Runner", mode = "v" }, + }, +}