kevinhwang91/nvim-bqf

Respect theme transparency

Buer-Nahida opened this issue · 15 comments

Feature description

Actually when openning bqf it looks like this:
图片
It doesn't respect my theme transparency and I can't find any solution to make it.

Describe the solution you'd like

Can we achieve this using a highlight group?

Additional context

No response

You can freely modify these bqf's highlight groups according to your preference. You can change the bg of BqfPreviewFloat to none to make it transparent. If your other float win is transparent, you could also try to link BqfPreviewFloat to NormalFloat.

I already changed the bg of BqfPreviewFloat highlight group to none, but now, the background is untransparent too
图片

Oh I see. Your first pic shows the bg is already transparent but a winblend was set by default for a level of opacity. So you don't need to modify BqfPreviewFloat any more. Just set winblend to 100 in your bqf config for a fully transparency.

{
	preview = {
		winblend = 100,
	}
}

Background is untransparent too
图片

As I said, just change winblend to 100. Don't change any bqf highlight groups.

Oh, I know, but the background is untransparent after I removed the code for changing bqf's highlight groups too
图片

In the pic of your first comment, the bg is already transparent but just kinda opaque. How did you get that?

I mean this pic
image
The words behind bqf are slightly visible.

..., this? It's vim.opt.cursorline
图片

No.
Screenshot 2024-01-12 at 21 19 09

It means your bqf preview window is already transparent. So based on this config, just set winblend and it's done.

图片
Yes, but preview.winblend seems to control the foreground of the text in the BQF preview window. What I want is to remove the solid black background.
图片

:h winblend

Please take a look at this image. It shows the effect of winblend = 100.
图片
So, it seems like winblend is unrelated to this issue.

cannot help. good luck.

winblend=0

If you want get transparent window as long as use winblend = 0

return {
  "kevinhwang91/nvim-bqf",
  ft = "qf",
  lazy = true,
  opts = {
    preview = {
      winblend = 0,
    },
  },
}

图片