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

bug: fzf-lua text invisible #283

Closed
mirsella opened this issue Jul 8, 2024 · 19 comments · Fixed by #299
Closed

bug: fzf-lua text invisible #283

mirsella opened this issue Jul 8, 2024 · 19 comments · Fixed by #299
Labels

Comments

@mirsella
Copy link

mirsella commented Jul 8, 2024

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 mirsella added the bug label Jul 8, 2024
@mirsella
Copy link
Author

mirsella commented Jul 8, 2024

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

@mirsella
Copy link
Author

mirsella commented Jul 9, 2024

discussion about it on the fzf Lua repo ibhagwan/fzf-lua#1325 (comment)

@mirsella
Copy link
Author

mirsella commented Jul 9, 2024

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

@sjclayton
Copy link
Contributor

@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
Copy link
Contributor

sjclayton commented Jul 22, 2024

@mirsella

I think the comment you left for me here --> #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
Copy link
Author

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
Copy link
Author

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

@sjclayton
Copy link
Contributor

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
Copy link
Author

mirsella commented Jul 22, 2024

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

@sjclayton
Copy link
Contributor

sjclayton commented Jul 23, 2024

@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
Copy link
Author

yes I do !
sorry should have a precised that

@sjclayton
Copy link
Contributor

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

@sjclayton
Copy link
Contributor

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

@sjclayton
Copy link
Contributor

@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
Copy link
Author

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
Copy link
Author

mirsella commented Jul 23, 2024

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
Copy link
Contributor

@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
Copy link
Author

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 🤷

in any case, thanks a lot !

@sjclayton
Copy link
Contributor

sjclayton commented Jul 23, 2024

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' }, 😁

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

Successfully merging a pull request may close this issue.

2 participants