xiyaowong / transparent.nvim

Remove all background colors to make nvim transparent
806 stars 23 forks source link

Keeping CursorColumn visible #60

Closed zyriab closed 3 months ago

zyriab commented 6 months ago

Hi! Thanks a lot for this very helpful plugin!

I've tried for multiple hours to get CursorColumn to not be transparent but I can't make it work, could you assist?

Here's my config:

        "xiyaowong/transparent.nvim",
        opts = {
            groups = { -- table: default groups
                "Normal",
                "NormalNC",
                "Comment",
                "Constant",
                "Special",
                "Identifier",
                "Statement",
                "PreProc",
                "Type",
                "Underlined",
                "Todo",
                "String",
                "Function",
                "Conditional",
                "Repeat",
                "Operator",
                "Structure",
                "LineNr",
                "NonText",
                "SignColumn",
                "StatusLine",
                "StatusLineNC",
                "EndOfBuffer",
            },
            extra_groups = {
                "NvimTreeNormal",
                "NormalFloat",
                "NvimTreeEndOfBuffer",
                "StatusLine",
                "StatusLineNC",
            }, -- table: additional groups that should be cleared
            exclude_groups = {
                "CursorLine",
                "CursorLineNr",
                "CursorColumn",
            }, -- table: groups you don't want to clear,

Here's what it looks like currently

image

Here's without transparency (the transparency on the borders is from my terminal)

image

I really can't get this to work. If a PR needs to be done, I'd be happy to contribute :)

Cheers and thank you!

jcmunozo commented 6 months ago

I'm facing the same issue with "CursorLine", I'd really appreciate support on this issue, please. ty :)

zyriab commented 6 months ago

@jcmunozo

I tried to fix your problem and fixed both :D I don't understand why it works, though. I'll let this open as I'd love to understand and perhaps it'll happen again in the future but it seems like I've found a fix that is at least temporary. See the screenshot below. If I re-deactivate cursorline I still have the column. :)

Here's the options that fix it for me, hope it'll help:

-- Enable cursor line highlighting
vim.opt.cursorline = true

-- I'm guessing you can use `line`?
vim.opt.cursorlineopt = "both"

-- Highlight the cursor's column (vertical)
vim.opt.cursorcolumn = true
image
jcmunozo commented 6 months ago

@zyriab
:o :o yes now it works !!, I'm using another theme so it doesn't look good XD, thank you so much :)