GithubHelp home page GithubHelp logo

Comments (5)

shortcuts avatar shortcuts commented on June 29, 2024 2

Hey @aabbccddeeffggj, thanks for using the plugin and reporting the issue, thanks @polirritmico for the help, much appreciated! ❤️

If you believe there is next step applicable for the default highlight groups of the plugin don't hesitate to suggest/open a pr, I'll more than happy to help :)

from no-neck-pain.nvim.

polirritmico avatar polirritmico commented on June 29, 2024 1

Don't know what is your expected color for the border, but try :lua vim.api.nvim_set_hl(0, "WinSeparator", { fg = 1250067 }). It's working for me.

from no-neck-pain.nvim.

aabbccddeeffggj avatar aabbccddeeffggj commented on June 29, 2024

Hi, thanks for the reply. I decided to use a specific association oh highlight colors for it to look more consistent, this is what I did:

  1. I changed the statusline color to the same one I defined for the no-neck-pain background
  2. Then, I changed all of the backgrounds of the elements of my statusline to have the actual statusline color I just had changed in the previous step.
  3. With these two steps above, the no-neck-pain statusline (which is empty) will have the same color as the background of the no-neck-pain windows, thus blending the statusline with the background, giving a more "correct" focus, I would say.
  4. About the WinSeparator highlight group, I decided to let both the fg and bg with the same color, and the reason is a neovim limitation, basically, look how it goes when having the WinSeparator's bg the same as the main background:
    image
    There are these little gaps which are pretty annoying to me, so I just decided to make it more homogeneous by making the fg and bg of the WinSeparator the same.

In the end it looks lke this:
image
image

from no-neck-pain.nvim.

polirritmico avatar polirritmico commented on June 29, 2024

So, if I'm correctly understanding, you have two states, one with NNP enabled that works fine with your highlights and one with windows splits that have that "huge gap" that you want to get rid of?

If so, I would go with a different approach and change the highlights when NNP is enabled and revert them when is disabled:

require("no-neck-pain").setup({
    -- your setup...
})

NoNeckPain_default_border_hl = {}
NoNeckPainToggleState = false

local NNP_toggle_with_custom_border_hl = function()
    local border_name = "WinSeparator"
    local custom_hl = { fg = "#131313" } -- or any color you like

    if NoNeckPain_default_border_hl.fg == nil then
        NoNeckPain_default_border_hl = vim.api.nvim_get_hl(
            0, { name = border_name, link = true }
        )
    end

    if NoNeckPainToggleState then
        vim.api.nvim_set_hl(0, border_name, NoNeckPain_default_border_hl)
    else
        vim.api.nvim_set_hl(0, border_name, custom_hl)
    end
    NoNeckPainToggleState = not NoNeckPainToggleState

    vim.cmd([[NoNeckPain]])
end

-- mapping
vim.keymap.set({"n"}, "<leader>tc", NNP_toggle_with_custom_border_hl, {silent=true})

from no-neck-pain.nvim.

aabbccddeeffggj avatar aabbccddeeffggj commented on June 29, 2024

Hi, in both screenshots I'm using the no-neck-separator layout.

from no-neck-pain.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.