File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 6161 require (" rest-nvim" ).setup ({
6262 -- Open request results in a horizontal split
6363 result_split_horizontal = false ,
64+ -- Keep the http file buffer above|left when split horizontal|vertical
65+ result_split_in_place = false ,
6466 -- Skip SSL verification, useful for unknown certificates
6567 skip_ssl_verification = false ,
6668 -- Highlight request on run
@@ -110,6 +112,8 @@ To run `rest.nvim` you should map the following commands:
110112
111113- ` result_split_horizontal ` opens result on a horizontal split (default opens
112114 on vertical)
115+ - ` result_split_in_place ` opens result below|right on horizontal|vertical split
116+ (default opens top|left on horizontal|vertical split)
113117- ` skip_ssl_verification ` passes the ` -k ` flag to cURL in order to skip SSL verification,
114118 useful when using unknown certificates
115119- ` highlight ` allows to enable and configure the highlighting of the selected request when send,
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ function, it looks like this by default:
5454`require("rest-nvim").setup({`
5555` -- Open request results in a horizontal split`
5656` result_split_horizontal = false,`
57+ ` -- Keep the http file buffer above|left when split horizontal|vertical
58+ ` result_split_in_place = false,
5759` -- Skip SSL verification, useful for unknown certificates`
5860` skip_ssl_verification = false,`
5961` -- Highlight request on run`
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ local M = {}
22
33local config = {
44 result_split_horizontal = false ,
5+ result_split_in_place = false ,
56 skip_ssl_verification = false ,
67 highlight = {
78 enabled = true ,
Original file line number Diff line number Diff line change @@ -101,9 +101,12 @@ local function create_callback(method, url)
101101 -- Only open a new split if the buffer is not loaded into the current window
102102 if vim .fn .bufwinnr (res_bufnr ) == - 1 then
103103 local cmd_split = [[ vert sb]]
104- if config .result_split_horizontal then
104+ if config .get ( " result_split_horizontal" ) then
105105 cmd_split = [[ sb]]
106106 end
107+ if config .get (" result_split_in_place" ) then
108+ cmd_split = [[ bel ]] .. cmd_split
109+ end
107110 vim .cmd (cmd_split .. res_bufnr )
108111 -- Set unmodifiable state
109112 vim .api .nvim_buf_set_option (res_bufnr , " modifiable" , false )
You can’t perform that action at this time.
0 commit comments