Giter Club home page Giter Club logo

Comments (6)

lewis6991 avatar lewis6991 commented on May 18, 2024
  1. numhl is disabled by default and when enabled the highlights it uses are fully configurable; you just need to define the highlights.
  2. We can do this and should be easy to implement since sign define has a linehl option.
  3. Again I'm not sure what you mean by this. Gitsigns allows you to specify the highlights to use for specific signs so you can define them how you like.

Thanks for the feedback and hopefully I haven't misunderstood your requests.

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 18, 2024

One tip is that you can run the :highlight command which should list all the defined highlights in your nvim. From this list you can pick out highlights you would like to use for each of the signs. This saves having to define the highlights manually. For example my colourscheme (moonlight.vim) defines the highlights GitGutterAdd, GitGutterChange and GitGutterDelete therefore I have my gitsigns config as:

        signs = {
          add          = {hl = 'GitGutterAdd'   },
          change       = {hl = 'GitGutterChange'},
          delete       = {hl = 'GitGutterDelete'},
          topdelete    = {hl = 'GitGutterDelete'},
          changedelete = {hl = 'GitGutterChange'},
        }

Which gives me the same sign highlights that I would get if I used gitgutter (which I used to use).

from gitsigns.nvim.

numToStr avatar numToStr commented on May 18, 2024

@lewis6991 Thanks for the quick reply. GitGutter* highlights is what I wanted as my theme also defines that.

Just to be clear, In 3 point what I wanted was rather depending on another highlight group. gitsigns can provide an option to apply default highlights on the fg rather than bg. It will give the user a nice option to change the behavior rather than define highlight on the individual state.

Something like this.

require("gitsigns").setup(
    {
        highlight_text = true -- Apply highlights to the text rather than backgroud
    }
)

Maybe I am asking too much

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 18, 2024

Sorry about the delay.

Just to be clear, In 3 point what I wanted was rather depending on another highlight group. gitsigns can provide an option to apply default highlights on the fg rather than bg. It will give the user a nice option to change the behavior rather than define highlight on the individual state.

Gitsigns doesn't apply highlights specifically on the fg or the bg, it just applies the highlight as fg and bg are both apart of the highlight. If you want to inverse the color of a highlight group so fg<->bg then just add reverse or inverse to the highlight group (see :help inverse.

from gitsigns.nvim.

lewis6991 avatar lewis6991 commented on May 18, 2024

Line highlighting is now implemented. Could we now close this issue? Let me know if you need any help with setting up highlights 🙂

from gitsigns.nvim.

numToStr avatar numToStr commented on May 18, 2024

Yeah sure.

from gitsigns.nvim.

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.