Giter VIP home page Giter VIP logo

Comments (8)

tudor07 avatar tudor07 commented on May 25, 2024 1

Wow, it works now, thank you so much

from melange-nvim.

savq avatar savq commented on May 25, 2024

The old LineNr had a terrible contrast ratio. It's unlikely I'll change it back.

Whitespace is more complicated tho. I made it brighter for a couple of reasons:

  • I wanted it to be brighter than Visual, so you could still see whitespace when selecting stuff. That's very important for me since I use virtualedit=block.
  • I started making better use of listchars, by:
    • Not setting space
    • Setting multispace (to see spaces used for alignment)
    • Setting leadmultispace to be different from multispace

You can see how that looks like in the README preview (left buffer). That's also why I don't use indent guides. Most of the time, leadmultispace is enough.

I assume you're using indent-blankline.nvim? I don't know the language/markup in your screenshot, but it looks weird since it's highlighting every column as an indent column instead of every 2 or 4. Maybe shiftwidth isn't configured properly in that buffer?

The most actionable thing right now is to highlight the indent guides using a darker color, since they're not real characters in the buffer.

from melange-nvim.

tudor07 avatar tudor07 commented on May 25, 2024

I guess no plan to allow overwriting colors either?

from melange-nvim.

savq avatar savq commented on May 25, 2024

I added the IndentBlanklineChar highlight group in #54

I guess no plan to allow overwriting colors either?

You can use the Lua API for that. In this case, if you want to darken Whitespace, you could link Whitespace to IndentBlanklineChar:

vim.cmd.colorscheme 'melange'

local id = vim.api.nvim_create_augroup('HighlightOverrides', {})
vim.api.nvim_create_autocmd('BufEnter', {
    group = id,
    pattern = '*',
    callback = function()
        vim.api.nvim_set_hl(0, 'Whitespace', { link = 'IndentBlanklineChar' })
    end,
})

from melange-nvim.

tudor07 avatar tudor07 commented on May 25, 2024

Screenshot 2023-01-31 at 11 13 48
Screenshot 2023-01-31 at 11 14 17

That... almost did the trick. Some whitespace are with new color (the brighter ones) and some are with the old color.
When I place the cursor inside the context of the method some whitespaces change the color from new to old one (check the whitespace right before "//").
Not sure how to make all of them the old color all the time.

from melange-nvim.

savq avatar savq commented on May 25, 2024

That's the intended behavior (I think?). See hl-IndentBlanklineContextChar

from melange-nvim.

tudor07 avatar tudor07 commented on May 25, 2024

I just wanted all the whitespaces to be the old color. Btw feel free to close this ticket if this is not something you are interested in doing, I realise this is just a personal preference of mine.

from melange-nvim.

savq avatar savq commented on May 25, 2024

Yeah, sorry. I misunderstood the question, and also misunderstood how indent-blankline worked. When the docs say:

Default: takes guifg color from 'Whitespace'

The really mean it. These highlight groups are not linked, but manually extended using synID* functions (wtf?) Anyways, I think they do that to set nocombine. 3c430b6 should probably highlight all the indent-related whitespace the same.

Let me know if that works.

from melange-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.