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:
Oliver Davies 2024-05-16 18:15:03 +01:00
parent ab29decb3e
commit cdd3ff23b7
2 changed files with 5 additions and 12 deletions

View file

@ -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>" }

View 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>")