File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ CONTENTS *rest-nvim-contents*
2121 3. Import body from external file......| rest-nvim-usage-external-files |
2222 4. Environment Variables........| rest-nvim-usage-environment-variables |
2323 5. Dynamic Variables................| rest-nvim-usage-dynamic-variables |
24+ 6. Callbacks................................| rest-nvim-usage-callbacks |
2425 5. Known issues..........................................| rest-nvim-issues |
2526 6. License..............................................| rest-nvim-license |
2627 7. Contributing....................................| rest-nvim-contributing |
@@ -220,6 +221,22 @@ You can extend or overwrite built-in dynamic variables, with the config key
220221` },`
221222`})`
222223
224+ ===============================================================================
225+ CALLBACKS *rest-nvim-usage-callbacks*
226+
227+ rest.nvim fires different events upon requests:
228+ - a User RestStartRequest event when launching the request
229+ - a User RestStopRequest event when the requests finishes or errors out
230+
231+ vim.api.nvim_create_autocmd("User", {
232+ pattern = "RestStartRequest",
233+ once = true,
234+ callback = function(opts)
235+ print("IT STARTED")
236+ vim.pretty_print(opts)
237+ end,
238+ })
239+
223240
224241===============================================================================
225242KNOWN ISSUES *rest-nvim-issues*
You can’t perform that action at this time.
0 commit comments