aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/rest.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
commit669561e21073e6efafddda25ba3ace69fb43819e (patch)
treef94ebd60ad4cab480b5cbcb7e65dd2060696c339 /lua/plugins/rest.lua
parent5044c70e9f62cdd06ee91e754423b07c1c18c12d (diff)
downloadnvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.tar.gz
nvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.zip
feat: apply stylua
Diffstat (limited to 'lua/plugins/rest.lua')
-rw-r--r--lua/plugins/rest.lua77
1 files changed, 39 insertions, 38 deletions
diff --git a/lua/plugins/rest.lua b/lua/plugins/rest.lua
index 7b60a9d..2391d02 100644
--- a/lua/plugins/rest.lua
+++ b/lua/plugins/rest.lua
@@ -1,42 +1,43 @@
return {
- "NTBBloodbath/rest.nvim",
- dependencies = { "nvim-lua/plenary.nvim" },
- ft = "http",
- config = function()
- local rest_nvim = require("rest-nvim")
+ "NTBBloodbath/rest.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ ft = "http",
+ config = function()
+ local rest_nvim = require "rest-nvim"
- 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,
- })
+ 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("<abuf>"), 10)
- vim.keymap.set("n", "<leader>rn", rest_nvim.run, { noremap = true, buffer = buff })
- vim.keymap.set("n", "<leader>rl", rest_nvim.last, { noremap = true, buffer = buff })
- vim.keymap.set("n", "<leader>rp", function() rest_nvim.run(true) end, { noremap = true, buffer = buff })
- end
- })
-
- end
+ vim.api.nvim_create_autocmd("FileType", {
+ pattern = "http",
+ callback = function()
+ local buff = tonumber(vim.fn.expand "<abuf>", 10)
+ vim.keymap.set("n", "<leader>rn", rest_nvim.run, { noremap = true, buffer = buff })
+ vim.keymap.set("n", "<leader>rl", rest_nvim.last, { noremap = true, buffer = buff })
+ vim.keymap.set("n", "<leader>rp", function()
+ rest_nvim.run(true)
+ end, { noremap = true, buffer = buff })
+ end,
+ })
+ end,
}