Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lualine highlight glitch #123

Closed
karma-riuk opened this issue Jul 3, 2023 · 1 comment
Closed

Lualine highlight glitch #123

karma-riuk opened this issue Jul 3, 2023 · 1 comment

Comments

@karma-riuk
Copy link
Contributor

After wanting to add highlighting to navic on lualine and following the README.md, a small glitch can be seen (c.f. image below)

image

As you can see, the last character of the navic component has transparent background.

My config for lualine and navic is the following

winbar = {
    lualine_c = {
        {
            "navic",
            color_correction = "static",
            navic_opts = { highlight = true },
        },
    },
    lualine_z = { "filename" },
},

(I don't think the rest is relevant, but I can show it if you feel like you need it)

I tried with a variety of files, languages and lsp servers, as well as setting highlight = true when I setup navic as opposed to using navic_opts, they all give me the same little glitch.

I don't know whether it is a navic problem or a lualine problem, but I have other components (such as the number of lsp warnings / errors present in the file) and they do not have that issue.

@karma-riuk
Copy link
Contributor Author

karma-riuk commented Jul 3, 2023

I'm so sorry, I'm blind... I thought I read the previous issues before posting, but right after posting I saw #115 is stating exactly the same issue.

The fix is the same as in that issue: removing the right padding to remove the invisible character:

lualine_c = {
    {
        "navic",
        color_correction = "static",
        navic_opts = { highlight = true },
        padding = {
            left = 1,
            right = 0,
        },
    },
},

Note the left = 1. For some reason if I only put padding = { right = 0 }, then both left and right would be set to zero. This was the left padding is as it was before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant