rose-pine / neovim

Soho vibes for Neovim
MIT License
2.21k stars 144 forks source link

bug: Telescope Transparency Issue #312

Closed dunnwithpuns closed 3 weeks ago

dunnwithpuns commented 4 weeks ago

Neovim version (nvim -v)

0.11.0

Terminal / multiplexer

WSL 2.0 Ubuntu

Describe the bug

Hey I'm new to neovim, so I'm not sure if it's a color-scheme issue or a skill issue. I'm using a mixture of theprimeagen's config and kickstart.nvim for context.

I'm having some trouble getting the transparency setting to work with telescope. It works great on my regular setup and netrw, but whenever I open telescope, it changes to the regular dark background.

Any advice or suggestions is much appreciated, thanks!

rose-pine-transparency-0 rose-pine-transparency-1 rose-pine-transparency-2

Repro

function ColorMyPencils(color)
    color = color or "rose-pine"
    vim.cmd.colorscheme(color)

    vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
    vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })

    vim.api.nvim_create_autocmd("TextYankPost", {
        desc = "Highlight when yanking (copying) text",
        group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
        callback = function()
            vim.highlight.on_yank()
        end,
    })
end

return {
    {
        "rose-pine/neovim",
        name = "rose-pine",
        config = function()
            require("rose-pine").setup({

                enable = {
                    terminal = true,
                },
                styles = {
                    italic = true,
                    bold = true,
                    transparancey = true,
                },
                highlight_groups = {
                    TelescopeBackground = { bg = "none" },
                    TelescopeBorder = { fg = "highlight_high", bg = "none" },
                    TelescopeNormal = { bg = "none" },
                    TelescopePromptNormal = { bg = "none" },
                    TelescopeResultsNormal = { fg = "subtle", bg = "none" },
                    TelescopeSelection = { fg = "text", bg = "none" },
                    TelescopeSelectionCaret = { fg = "rose", bg = "rose" },
                    CurSearch = { fg = "base", bg = "rose", inherit = false },
                    Search = { bg = "rose", blend = 20, inherit = false },
                },
            })
        end,
    },
}
mvllow commented 4 weeks ago

Hmm can't reproduce this on my system but you shouldn't need the ColorMyPencils or any other setting of backgrounds to "none"—looks like you have a typo though as it should be "transparency".

dunnwithpuns commented 4 weeks ago

Welp that will definitely do it haha thanks for the help and the lovely theme!

dunnwithpuns commented 4 weeks ago

Okay wait, second question, I've figured out that if I add vim.opt.cursorline = false to ColorMyPencils() and call it form within netrw, I can remove the cursor background line, but everytime I reopen netrw it comes back. Do you know of a way to edit that setting permanently?

mvllow commented 3 weeks ago

Pretty sure there's an autocmd event that is for the filetype of netrw or similar which you could then set vim.opt.cursorline = false if you want to only disable the cursorline while in netrw. Otherwise simply move that setting out of the function and it will apply always.

dunnwithpuns commented 3 weeks ago

Sorry, I'm just all over the place lol. I couldn't find the netrw specific event, but I tried using the BufWinEnter event and it worked, but only when opening vim for the first time. For more context, I have vim.opt.cursorline = false already set in my options file, so there isn't a cursor line in whenever I'm in a file (as seen in screenshot 3), but for whatever reason it's there for netrw, so I'm just kinda lost as to how that even happens lol.

mvllow commented 3 weeks ago

You might have a plugin that is enabling the cursorline. Either way not an issue with this theme so we can keep this closed.