Skip to content

Commit f1597ab

Browse files
committed
feat: adding a RestLog command
1 parent c349020 commit f1597ab

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/rest-nvim.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ COMMANDS *rest-nvim-usage-commands*
120120
Same as `RestNvim` but it returns the cURL command without executing the
121121
request. Intended for debugging purposes.
122122

123+
- `:RestLog`
124+
Shows `rest.nvim` logs (export DEBUG_PLENARY=debug for more logs).
125+
123126
- `:RestSelectEnv path/to/env`
124127
Set the path to an env file.
125128

plugin/rest-nvim.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ nnoremap <Plug>RestNvimLast :lua require('rest-nvim').last()<CR>
1212

1313
command! -nargs=? -complete=file RestSelectEnv :lua require('rest-nvim').select_env(<f-args>)<cr>
1414

15+
lua << EOF
16+
vim.api.nvim_create_user_command('RestLog', function()
17+
vim.cmd(string.format('tabnew %s', vim.fn.stdpath('cache')..'/rest.nvim.log'))
18+
end, { desc = 'Opens the rest.nvim log.', })
19+
EOF
20+
1521
let s:save_cpo = &cpo
1622
set cpo&vim
1723

0 commit comments

Comments
 (0)