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!
This commit is contained in:
parent
8ed8b71a7e
commit
2cee68f31d
17
roles/neovim/files/after/plugin/nvim-rest.lua
Normal file
17
roles/neovim/files/after/plugin/nvim-rest.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
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()
|
|
@ -121,6 +121,9 @@ return packer.startup(function()
|
||||||
use "kristijanhusak/vim-dadbod-completion"
|
use "kristijanhusak/vim-dadbod-completion"
|
||||||
use "kristijanhusak/vim-dadbod-ui"
|
use "kristijanhusak/vim-dadbod-ui"
|
||||||
|
|
||||||
|
-- HTTP client
|
||||||
|
use "rest-nvim/rest.nvim"
|
||||||
|
|
||||||
-- Text objects
|
-- Text objects
|
||||||
use "kana/vim-textobj-indent"
|
use "kana/vim-textobj-indent"
|
||||||
use "kana/vim-textobj-user"
|
use "kana/vim-textobj-user"
|
||||||
|
|
Loading…
Reference in a new issue