chore(nvim): setup rest-nvim correctly
On version 2.0.0 the installation and configuration were updated.
This commit is contained in:
parent
cd84775ca7
commit
3a2d22e64b
@ -164,37 +164,57 @@ return {
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'vhyrro/luarocks.nvim',
|
||||
priority = 1000,
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
'rest-nvim/rest.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
dependencies = { 'luarocks.nvim' },
|
||||
ft = {
|
||||
'http',
|
||||
'rest',
|
||||
},
|
||||
opts = {
|
||||
result_split_horizontal = false,
|
||||
result_split_in_place = false,
|
||||
skip_ssl_verification = false,
|
||||
config = function()
|
||||
require('rest-nvim').setup {
|
||||
client = 'curl',
|
||||
custom_dynamic_variables = {},
|
||||
encode_url = true,
|
||||
env_file = '.env',
|
||||
skip_ssl_verification = false,
|
||||
highlight = {
|
||||
enabled = true,
|
||||
enable = true,
|
||||
timeout = 15,
|
||||
},
|
||||
result = {
|
||||
show_url = true,
|
||||
show_curl_command = true,
|
||||
show_http_info = true,
|
||||
show_headers = true,
|
||||
behavior = {
|
||||
decode_url = true,
|
||||
formatters = {
|
||||
json = 'jq',
|
||||
html = false,
|
||||
},
|
||||
jump_to_request = true,
|
||||
env_file = '.env',
|
||||
custom_dynamic_variables = {},
|
||||
yank_dry_run = true,
|
||||
show_info = {
|
||||
curl_command = true,
|
||||
headers = true,
|
||||
http_info = true,
|
||||
url = true,
|
||||
},
|
||||
statistics = {
|
||||
enable = true,
|
||||
stats = {
|
||||
{ 'total_time', title = 'Time taken:' },
|
||||
{ 'size_download_t', title = 'Download size:' },
|
||||
},
|
||||
},
|
||||
},
|
||||
split = {
|
||||
horizontal = false,
|
||||
in_place = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = function()
|
||||
local status_ok, which_key = pcall(require, 'which-key')
|
||||
if status_ok then
|
||||
@ -203,13 +223,13 @@ return {
|
||||
}
|
||||
end
|
||||
return {
|
||||
{ '<leader>tr', '<Plug>RestNvim', desc = 'Run the request under cursor' },
|
||||
{ '<leader>tr', '<cmd>Rest run<cr>', desc = 'Run the request under cursor' },
|
||||
{
|
||||
'<leader>tp',
|
||||
'<Plug>RestNvimPreview',
|
||||
desc = 'Preview the curl command for the request under cursor',
|
||||
},
|
||||
{ '<leader>tl', '<Plug>RestNvimLast', desc = 'Re-run the last request' },
|
||||
{ '<leader>tl', '<cmd>Rest run last<cr>', desc = 'Re-run the last request' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user