File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ local request = require("rest-nvim.request")
4141local logger = require (" rest-nvim.logger" )
4242local parser = require (" rest-nvim.parser" )
4343local ui = require (" rest-nvim.ui.result" )
44+ local config = require (" rest-nvim.config" )
4445
4546
4647--- @type table<string , RestCmd>
@@ -93,6 +94,19 @@ local rest_command_tbl = {
9394 end
9495 end ,
9596 },
97+ cookies = {
98+ impl = function (_ , opts )
99+ local is_split = opts .smods .vertiacal or opts .smods .horizontal
100+ local is_tab = opts .smods .tab ~= - 1
101+ if is_split or is_tab then
102+ --- @diagnostic disable-next-line : invisible
103+ vim .cmd (opts .mods .. " split " .. config .cookies .path )
104+ else
105+ --- @diagnostic disable-next-line : invisible
106+ vim .cmd .edit (config .cookies .path )
107+ end
108+ end ,
109+ },
96110 env = {
97111 impl = function (args , _ )
98112 if not args [1 ] or args [1 ] == " show" then
You can’t perform that action at this time.
0 commit comments