Coder Social home page Coder Social logo

Comments (4)

dstein64 avatar dstein64 commented on June 16, 2024 1

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

from nvim-scrollview.

sho-87 avatar sho-87 commented on June 16, 2024 1

awesome! thanks for your speed

from nvim-scrollview.

sho-87 avatar sho-87 commented on June 16, 2024

@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,
    }
  },
})
  1. 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
  1. nvim using the config above
  2. add a new line to the end of the file and you'll see this, which is the correct colour for an addition:
    image
  3. go to the line above and change it, and this is where it goes wrong:
    image

the marker is still there for the line addition, but the colour that used to be the correct blue has now turned into purple

from nvim-scrollview.

dstein64 avatar dstein64 commented on June 16, 2024

The second issue is fixed in 5a7eb7e. 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.

from nvim-scrollview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.