luukvbaal / statuscol.nvim

Status column plugin that provides a configurable 'statuscolumn' and click handlers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gitsigns unresponsive on click

clvnkhr opened this issue · comments

Hi, I have an issue with getting gitsigns to work correctly on click, they used to open a floating window showing the diff but they don't anymore? I may have changed something but when I reverted to an older commit of my dotfiles it also didn't work.

OS is Mac, neovim v0.9. I'm passing to statuscol via lazy.nvim:

config = function()
	local builtin = require("statuscol.builtin")
	require("statuscol").setup({
		segments = {
			{ text = { "%s" },             click = "v:lua.ScSa" },
			{ text = { builtin.lnumfunc }, click = "v:lua.ScLa", },
			{
				text = { " ", builtin.foldfunc, " " },
				condition = { builtin.not_empty, true, builtin.not_empty },
				click = "v:lua.ScFa"
			}, }
	})
end

should this be enough? I did try reading the help for statuscol.nvim but I must admit I didn't quite understand (sorry).

I also have gitsigns, todo-comments.nvim, trouble.nvim. (And others but I don't think they matter.)

I tried installing only statuscol.nvim in a fresh install of kickstart.nvim with the above setting and still could not get the floating window to appear.

gitsigns setup is simple (custom signs, enable yadm, keymaps in on_attach). In particular calling :lua require('gitsigns').next_hunk() does exactly what I want on click. The gitsigns appear, but are unresponsive to clicks. clicking on signs from LSP diagnostics will open a floating window correctly. Clicking on the fold indicator (nvim-ufo) also works.

Thanks for the plugin and any help you can give.

Apparently, gitsigns.nvim decided to change the name of the defined signs: lewis6991/gitsigns.nvim@f868d82.
I applied a fix to also check for the signs' highlight group, which is still named the same, and hopefully more stable.

excellent, thanks a lot!