kawre / leetcode.nvim

A Neovim plugin enabling you to solve LeetCode problems.
MIT License
1.04k stars 44 forks source link

Is there a way to make Leet Console background trasparent? #87

Closed ghost closed 5 months ago

ghost commented 5 months ago

When setting nvim theme to be transparent, the Leetcode Start Panel and Problem Description fit the transparent theme well, While the Leetcode Console panel isn't transparent, which a little weird.

Are there some configs I can change to set the console to be transparent?

Effect:

屏幕截图_20240408_123458

kawre commented 5 months ago

Isn't that intended? Having two overlapping transparent buffers would make them unreadable I guess.

Do other plugins like lazy.nvim have transparent pop up windows?

ghost commented 5 months ago

As I know, telescope and lazygit has transparent pop up windows, which is not overlapping instead replace.

Examples:

屏幕截图_20240409_005342

kawre commented 5 months ago

Ok, then you have to make NormalSB highlight group also transparent(it's the hl console uses)

ghost commented 5 months ago

Thanks for your help, I've overwritten the NormalSB highlight group, and now the console background is transparent, but there is a black line on the right border of the console.

The black line exists before overwriting NormalSB, and becomes more obvious because of the contrast. It seems an another part of the console panel which doesn't affected by the NormalS.

I just found that the information panel of leetcode has the same problem of console, as they both have NormalSB highlight group. The information panel doesn't have the black line however after overwriting NormalSB.

I try to find the relative part to the black line with nothing.

What I Done:

Overwrite the NormalSB highlight group in my theme setting:

{
    "catppuccin/nvim",
    name = "catppuccin",
    priority = 1000,
    opts = {
      transparent_background = true,
      custom_highlights = function(colors)
        return {
          NormalSB = { bg = colors.none },
        }
      end,
    },
  },

Effects:

the console after overwriting: 1

the information panel after overwriting: 2

kawre commented 5 months ago

Weird, I don't have that line. Maybe it's some other plugin