Closed utensil closed 1 week ago
Seems like this would be a common pattern and desired feature, yes!
I'd be open for a PR which implements this with an explicit vim command.
One of these two ways I'd gladly accept:
GhActionsClose
or GhActionsToggle
commandGhActions
command to accept subcommands like open
, close
, toggle
In the meantime, if you use lazy, you should be able to implement this in your plugin spec like this:
{
'topaxi/gh-actions.nvim',
keys = {
{ '<leader>gh', '<cmd>GhActions<cr>', desc = 'Open Github Actions' },
{ '<leader>gc', function() require('gh-actions').close() end, desc = 'Close Github Actions' },
},
opts = {},
},
Ah, nice! I didn't realize how to get the window (i.e. require('gh-actions')
) for closing.
I've set this to <leader>gq
as gc
conflicts with my telescope git commit search, and it seems to work!
So far gh-actions.nvim provides command
:GhActions
and a key mapping<leader>+gh
, which is nice. But it seems that I have to focus the split window then:q
to close it. Similar plugins will provide a toggle command to turn it on and off, and use the same key mapping.Is this a desirable feature to implement? 😄