rose-pine / neovim

Soho vibes for Neovim
MIT License
2.14k stars 140 forks source link

bug: fzf-lua text invisible #283

Closed mirsella closed 2 weeks ago

mirsella commented 4 weeks ago

Neovim version (nvim -v)

NVIM v0.11.0-dev-358+g6a886a251

Terminal / multiplexer

konsole

Describe the bug

hello when using fzf lua most of the item listing are invisible 1 2

I'm not sure if it's something we can fix in rose pine, but I don't know where to find help otherwise, maybe this can be added as a plugin like some other in the wiki

Repro

vim.o.packpath = "/tmp/nvim/site"

local plugins = {
    rose_pine = "https://github.com/rose-pine/neovim",
    fzf_lua = "https://github.com/ibhagwan/fzf-lua",
}

for name, url in pairs(plugins) do
    local install_path = "/tmp/nvim/site/pack/test/start/" .. name
    if vim.fn.isdirectory(install_path) == 0 then
        vim.fn.system({ "git", "clone", "--depth=1", url, install_path })
    end
end

require("rose-pine").setup({})

vim.cmd("colorscheme rose-pine")

require("fzf-lua").setup({ fzf_colors = true })

-- then do FzfLua files
mirsella commented 4 weeks ago

relevant part in fzf lua docs https://github.com/ibhagwan/fzf-lua?tab=readme-ov-file#fzf-colors

mirsella commented 4 weeks ago

discussion about it on the fzf Lua repo https://github.com/ibhagwan/fzf-lua/discussions/1325#discussioncomment-9993832

mirsella commented 4 weeks ago

Using this highlight group FzfLuaCursorLine = { bg = "highlight_med", fg = "text" }, for now image

sjclayton commented 2 weeks ago

@mirsella

By any chance does the override you mention above work without you setting a foreground for FzfLuaCursorLine... just only the background?

Because that highlight group links to CursorLine according to FzfLua's documentation about highlight groups here, and CursorLine doesn't normally have a foreground color set.

sjclayton commented 2 weeks ago

@mirsella

I think the comment you left for me here --> https://github.com/rose-pine/neovim/issues/277

Was actually in regards to this... if so can you try doing what I asked above? I'd like to try to see if this is something we can fix.

mirsella commented 2 weeks ago

doesn't work, here is the result without fg: image

yes the comment you left on the other issue i thought it was for me, because the tag @. mvllow looks like @mirsella lol, but i was answering to the message you left there not this one.

thanks for looking into it !

mirsella commented 2 weeks ago

maybe fzf lua overwrite the fg with this whiter color. it works on dark mode tho image

sjclayton commented 2 weeks ago

I don't have FzfLua installed (I use Telescope)... so I can't check necessarily what it's doing... I can only go by the documentation.

Let me look into things a bit more.

mirsella commented 2 weeks ago

CursorLine = { bg = "highlight_med", fg = "text" }, also fix it, but it still require the fg

sjclayton commented 2 weeks ago

@mirsella

I am in the middle of working on a fix for this now hopefully.

Quick question.. do you by any chance use LazyVim?

Edited 30 seconds later: God I'm blind.... lol 😝

mirsella commented 2 weeks ago

yes I do ! sorry should have a precised that

sjclayton commented 2 weeks ago

Yeah I figured that out.... says right in the one screenshot... shakes head 😆

sjclayton commented 2 weeks ago

Do you have any config customization you've done specifically for FzfLua, or are you just using LazyVim's default config for it?

sjclayton commented 2 weeks ago

@mirsella

Just submitted the PR that should be a good fix for this.. you can test it, by modifying your rose-pine config with the following:

{
  -- 'rose-pine/neovim',
  'sjclayton/rose-pine',
  branch = 'fix-fzflua-invisible-selection',
  -- rest of your rose-pine config below
},

Let me know how it goes.. 😄

mirsella commented 2 weeks ago

hey ! thanks a lot ! sadly this still doesn't work (yes im on your branch with lazy.nvim) the issue only happens on light mode !

mirsella commented 2 weeks ago

Wait what, it work when my config is

    {
        -- "rose-pine/neovim",
        "sjclayton/rose-pine",
        branch = "fix-fzflua-invisible-selection",
        name = "rose-pine",
        priority = 10000,
        opts = {},
    },

but

    {
        -- "rose-pine/neovim",
        "sjclayton/rose-pine",
        branch = "fix-fzflua-invisible-selection",
        name = "rose-pine",
        priority = 10000,
        -- opts = {},
    },

doesn't !

sjclayton commented 2 weeks ago

@mirsella

Does it work if you pass in opts in the opts table like normal.... that is weird, I don't know why it wouldn't work if opts was commented out... you shouldn't have to call setup or pass config = true.

Do you have a plugin spec for rose-pine somewhere else in your config or did you just modify the existing one you had?

mirsella commented 2 weeks ago

ok this was really weird, my bad. i had

return {
    "f-person/auto-dark-mode.nvim",
    dependencies = { "rose-pine/neovim" },
    opts = {
        update_interval = 1000,
        set_dark_mode = function()
            vim.cmd("colorscheme rose-pine-moon")
        end,
        set_light_mode = function()
            vim.cmd("colorscheme rose-pine-dawn")
        end,
    },
}

in another .lua config, but lazy.nvim said it was yours version that was installed and loaded, so i thought it was ok since lazy nvim said the right version was loaded. image

the behaviour is weird, in lazy.nvim in this case when opts = {} was commented out the plugin.setup() wasn't called, but when settings opts = {} it would be called. guess when it wasn't called, the one in the dependencies of the other spec would be used instaed :shrug:

in any case, thanks a lot !

sjclayton commented 2 weeks ago

That explains why it wasn't working...

If you change one reference to my fork of rose-pine you have to change all other references to my fork as well or lazy doesn't know which to prioritize.

So that dependencies line would need to be { dependencies = 'sjclayton/rose-pine' }, 😁