nvim icon indicating copy to clipboard operation
nvim copied to clipboard

fix(telescope): nvchad and transparency

Open Lalit64 opened this issue 8 months ago • 8 comments

Hi, Here is a small fix to basically make it so that if the telescope.style = "nvchad" and transparent_background = true, then telescope will be opaque and non transparent. I think that if the user explicitly specifies that telescope.style = "nvchad" the user would want the telescope window to be opaque.

Lalit64 avatar Apr 03 '25 13:04 Lalit64

Thanks for your contributions, please also attach a before/after screenshot so that we can review this more easily.

vollowx avatar Apr 03 '25 13:04 vollowx

With config:

opts = {
  flavour = "mocha",
  transparent_background = true,
  integrations = {
    telescope = {
      enabled = true,
      style = "nvchad",
    },
  },
}

Before: CleanShot 2025-04-03 at 19 52 05@2x

After: CleanShot 2025-04-03 at 19 51 11@2x

Lalit64 avatar Apr 03 '25 14:04 Lalit64

i think there should probably be a opts.integrations.telescope.transparent option that should default to the global transparent_background setting. this way users can still maintain the old behavior.

comfysage avatar Apr 04 '25 10:04 comfysage

@comfysage I think that if the user wants nvchad enabled he would want it to be opaque? If the user doesn't have nvchad enabled and transparency enabled it is still normal and not opaque.

Lalit64 avatar Apr 04 '25 11:04 Lalit64

I agree with @comfysage here; it makes the most sense to me to add an option to allow users who have enabled transparent_background globally to disable transparency specifically for this integration to attain the behavior you refer to.

uncenter avatar Apr 04 '25 14:04 uncenter

@uncenter style = "nvchad" is the option to disable transparency as of this pr. If it is not defined then it is by default transparent. Why would the user do style = "nvchad" and then want to enable transparency in telescope?

Lalit64 avatar Apr 04 '25 16:04 Lalit64

Hey can someone check this out?

Lalit64 avatar Apr 06 '25 03:04 Lalit64

NvChad also has its outlined telescope which looks like this

image

Personally I think we should have 3 styled that names default, nvchad and nvchad_outlined in order to follow NvChad, and I wonder if you could help implement this outlined style since I can't code these days.

vollowx avatar May 31 '25 13:05 vollowx

Please check #877

vollowx avatar Jul 22 '25 12:07 vollowx