Update rest-nvim configuration
- Remove use of `pcall` to simplify requiring the plugin. - Replace usages of custom keybinding functions with `vim.keymap.set()`.
This commit is contained in:
parent
ab29decb3e
commit
cdd3ff23b7
|
@ -1,12 +0,0 @@
|
||||||
local status_ok, rest_nvim = pcall(require, "rest-nvim")
|
|
||||||
if not status_ok then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
rest_nvim.setup()
|
|
||||||
|
|
||||||
local nmap = require("opdavies.keymap").nmap
|
|
||||||
|
|
||||||
nmap { "<leader>rr", "<plug>RestNvim<cr>" }
|
|
||||||
nmap { "<leader>rp", "<plug>RestNvimPreview<cr>" }
|
|
||||||
nmap { "<leader>rl", "<plug>RestNvimLast<cr>" }
|
|
5
after/plugin/rest-nvim.lua
Normal file
5
after/plugin/rest-nvim.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
require("rest-nvim").setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>rr", "<plug>RestNvim<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>rp", "<plug>RestNvimPreview<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>rl", "<plug>RestNvimLast<cr>")
|
Reference in a new issue