Closed sho-87 closed 3 months ago
The spacing issue is addressed as of PR #130. When scrollview_always_show
is used and a sign for gitsigns
would correspond to multiple rows of the scrollview column, all those rows will be used.
@sho-87, can you provide steps for reproducing the other issue? Something like:
$ git clone <REPO>
$ git checkout <COMMIT>
$ nvim
# plus a list of edits to the file to reproduce the issue
@dstein64
to reproduce, here is a fresh config that bootstraps lazy and grabs scrollview and gitsigns at specific commits:
init.lua:
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
end ---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
{
"lewis6991/gitsigns.nvim",
commit = "078041e",
config = function(_, opt)
require('gitsigns').setup {
signcolumn = true,
}
end
},
{
"dstein64/nvim-scrollview",
commit = "1d80f72",
config = function(_, opts)
require("scrollview").setup(opts)
require("scrollview.contrib.gitsigns").setup(opts)
end,
opts = {
always_show = true,
column=40,
}
},
})
git init
in a directory, create a new file, and commit it. I just used some random text like:
jkh
jklsdfh
sdf
sdf
sdf
sdf
sdf
sdf
sdf
sdfdsf
asdasdasd
isdfsdf
the marker is still there for the line addition, but the colour that used to be the correct blue has now turned into purple
The second issue is fixed in 5a7eb7e6c1b921761615b57a6140d73b1cc2b034. A gitsigns
change hunk could be comprised of a change and an addition. The existing code was assuming it was only a change, with no addition.
@sho-87, thanks for reporting the issue and providing the detailed reproduction steps. If you're still encountering a problem, please let me know with a new Issue or a comment here.
awesome! thanks for your speed
ive noticed a couple of problems with gitsigns re: spacing and colour
Spacing
if you look at gitsigns on the left of my screen you'll see changes to 3 consecutive rows.
in scrollview on the right there is additional space between each sign, as well as the mark
looks like this is because the #lines is less than the height of the window, so the scrollview needs to stretch the placement of things to cover the entire height. this can be confirmed by just changing the height of the nvim window:
Colour
the colour for added lines is incorrect. it shows up as yellow but, as you can see from the left of the image above, gitsigns has it configured as green