Skip to content

Commit 86ee64d

Browse files
docs: update api documents
1 parent 5c1fc0f commit 86ee64d

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

doc/rest-nvim-api.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ parser.parse_request_handler({node}, {source}, {context})
153153
{context} (rest.Context) @return function?
154154

155155

156+
*parser.parse_redirect_path*
157+
parser.parse_redirect_path({node}, {source}, {ctx})
158+
159+
Parameters: ~
160+
{node} (TSNode)
161+
{source} (Source)
162+
{ctx} (rest.Context) @return function?
163+
164+
156165
parser.get_request_names({source}) *parser.get_request_names*
157166

158167
Parameters: ~
@@ -291,6 +300,18 @@ utils.read_file({path}) *utils.read_file*
291300
utils.parse_http_time() *utils.parse_http_time*
292301

293302

303+
utils.parse_url({url}) *utils.parse_url*
304+
parse url to domain and path
305+
path will be fallback to "/" if not found
306+
307+
Parameters: ~
308+
{url} (string)
309+
310+
Returns: ~
311+
(string) domain
312+
(string) path
313+
314+
294315
*utils.ts_highlight_node*
295316
utils.ts_highlight_node({bufnr}, {node}, {ns}, {timeout})
296317

doc/rest-nvim.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,11 @@ rest.Opts.Cookies *rest.Opts.Cookies*
210210
rest.Opts.Env *rest.Opts.Env*
211211

212212
Fields: ~
213-
{enable?} (boolean) Enable the `.env` files support (Default: `true`)
214-
{pattern?} (string) Environment variables file pattern for telescope.nvim (Default: `"%.env.*"`)
213+
{enable?} (boolean) Enable the `.env` files support (Default: `true`)
214+
{pattern?} (string) Environment variables file pattern for telescope.nvim (Default: `"%.env.*"`)
215+
{find?} (fun():string[]) Function lists environment files (used for `:Rest env select`)
216+
Searches for file matching *rest.Opts.Env.pattern* under same directory by
217+
default
215218

216219

217220
rest.Opts.UI *rest.Opts.UI*

0 commit comments

Comments
 (0)