snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

bug: using picker to select gitsigns actions does nothing

Open leoperegrino opened this issue 7 months ago • 2 comments

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

  1. cd $(mktemp -d)
  2. git init
  3. create the mini.lua with configurations specified next
  4. nvim -u mini.lua mini.lua # or any unstaged file
  5. run keymap g1 select stage_buffer and check that it does nothing
  6. run keymap g2 select stage_buffer and check that it does nothing
  7. run :Gitsigns stage_buffer and 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, }, },
	},
})

leoperegrino avatar Apr 22 '25 15:04 leoperegrino

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.

github-actions[bot] avatar May 23 '25 02:05 github-actions[bot]

Still happening

tim-hilde avatar May 29 '25 18:05 tim-hilde

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.

github-actions[bot] avatar Jun 29 '25 02:06 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jul 06 '25 02:07 github-actions[bot]

The Issue is still present

docmg avatar Aug 08 '25 08:08 docmg