From 5b6c5ca5b0f081c799fa870dec3a88178c1e28e6 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Mon, 9 Jan 2023 20:55:56 +0100 Subject: feat: move rest to lazy loading --- after/plugin/rest.lua | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 after/plugin/rest.lua (limited to 'after/plugin/rest.lua') diff --git a/after/plugin/rest.lua b/after/plugin/rest.lua deleted file mode 100644 index f9417dd..0000000 --- a/after/plugin/rest.lua +++ /dev/null @@ -1,38 +0,0 @@ -local ok, rest_nvim = pcall(require, "rest-nvim") -if not ok then - return -end - -rest_nvim.setup({ - -- Open request results in a horizontal split - result_split_horizontal = false, - -- Skip SSL verification, useful for unknown certificates - skip_ssl_verification = false, - -- Highlight request on run - highlight = { - enabled = true, - timeout = 150, - }, - result = { - -- toggle showing URL, HTTP info, headers at top the of result window - show_url = true, - show_http_info = true, - show_headers = true, - }, - -- Jump to request line on run - jump_to_request = false, - env_file = ".env", - custom_dynamic_variables = {}, - yank_dry_run = true, -}) - -vim.api.nvim_create_autocmd("FileType", { - pattern = "http", - callback = function () - local buff = tonumber(vim.fn.expand(""), 10) - vim.keymap.set("n", "rn", rest_nvim.run, { noremap = true, buffer = buff }) - vim.keymap.set("n", "rl", rest_nvim.last, { noremap = true, buffer = buff }) - vim.keymap.set("n", "rp", function () rest_nvim.run(true) end, { noremap = true, buffer = buff }) - end -}) - -- cgit v1.2.3