2021-10-04 11:46:14 +00:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- - Vim REST Console setup and extra commands -
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
2022-04-29 11:40:44 +00:00
|
|
|
local vim_rest_console_extensions = require("esensar.vim_rest_console_extensions")
|
2022-04-29 07:46:45 +00:00
|
|
|
vim.api.nvim_create_user_command(
|
|
|
|
"ScratchRestConsole",
|
|
|
|
vim_rest_console_extensions.open_scratch_rest_console,
|
2022-05-12 19:12:01 +00:00
|
|
|
{ nargs = 0, desc = "Open scratch RestConsole file - for testing HTTP calls" }
|
2022-04-28 13:53:54 +00:00
|
|
|
)
|
2022-04-29 07:46:45 +00:00
|
|
|
vim.api.nvim_create_user_command("RestConsole", function(args)
|
|
|
|
vim_rest_console_extensions.open_cached_rest_console(args.fargs)
|
2022-05-12 19:12:01 +00:00
|
|
|
end, { nargs = "?", desc = "Opens up a rest console which can be saved -- cached by name or project" })
|
2022-04-29 07:46:45 +00:00
|
|
|
vim.api.nvim_create_user_command("RestConsoleLocal", function(args)
|
|
|
|
vim_rest_console_extensions.open_local_rest_console(args.fargs)
|
2022-05-12 19:12:01 +00:00
|
|
|
end, { nargs = "?", desc = "Opens up a rest console based on local file path" })
|
2022-04-29 07:46:45 +00:00
|
|
|
vim.api.nvim_create_user_command("RestConsoleCached", function(args)
|
|
|
|
vim_rest_console_extensions.open_named_cached_rest_console(args.fargs[0] or args.fargs[1])
|
2022-05-12 19:12:01 +00:00
|
|
|
end, { nargs = 1, desc = "Opens up a rest console which can be saved -- cached by name and project" })
|