snacks.nvim
snacks.nvim copied to clipboard
bug: using picker to select gitsigns actions does nothing
Did you check docs and existing issues?
- [x] I have read all the snacks.nvim docs
- [x] I have updated the plugin to the latest version before submitting this issue
- [x] I have searched the existing issues of snacks.nvim
- [x] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.11.0 Build type: Release LuaJIT 2.1.1741730670
Operating system/version
Linux 6.13.3 NixOS
Describe the bug
Actions of the gitsigns.nvim won't do anything upon selecting when using picker from Snacks.
This happens either configuring with on_attach opt of gitsigns or just simple keymap.
The command Gitsigns {action} does work when ran from the command line with the desired action.
Steps To Reproduce
cd $(mktemp -d)git init- create the mini.lua with configurations specified next
nvim -u mini.lua mini.lua # or any unstaged file- run keymap
g1selectstage_bufferand check that it does nothing - run keymap
g2selectstage_bufferand check that it does nothing - run
:Gitsigns stage_bufferand check that it does work
Expected Behavior
Selection of <cmd>Gitsigns<CR> actions should execute.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
local function on_attach(buffer)
vim.keymap.set("n", "g1", "<cmd>Gitsigns<cr>", { buffer = buffer, })
end
vim.keymap.set("n", "g2", "<cmd>Gitsigns<cr>" )
require("lazy.minit").repro({
spec = {
{ "folke/snacks.nvim", opts = { picker = { enabled = true }, }, },
-- add any other plugins here
{ 'lewis6991/gitsigns.nvim', opts = { on_attach = on_attach, attach_to_untracked = true, }, },
},
})
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Still happening
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
The Issue is still present