dotfiles/roles/neovim/files/after/plugin/nvim-rest.lua
Oliver Davies 2cee68f31d feat(nvim): add HTTP client plugin
I went to GitHub to find a HTTP client plugin that I could use to
replace Postman, and found https://github.com/rest-nvim/rest.nvim.

It seems to work well. Thanks @NTBBloodbath!
2022-08-18 00:09:53 +01:00

18 lines
393 B
Lua

local status_ok, rest_nvim = pcall(require, "rest-nvim")
if not status_ok then
return
end
local nmap = require("opdavies.keymap").nmap
-- Run the request.
nmap { "<leader>rr", "require('rest-nvim').run()" }
-- Preview the request.
nmap { "<leader>rp", "require('rest-nvim').run(true)" }
-- Re-run the last request.
nmap { "<leader>rl", "require('rest-nvim').last()" }
rest_nvim.setup()