williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.69k stars 271 forks source link

Allow to change border color to work with transparent plugin #1613

Open neilfranci opened 8 months ago

neilfranci commented 8 months ago

I've searched open issues for similar requests

I've recently downloaded the latest plugin version of mason.nvim

Problem description

I'm using xiyaowong/transparent.nvim to enable transparently. Telescope works great without any extra config, Which-key has "WhichKeyBorder" but Mason doesn't have any as far as I know 😭

Here how it looks with border = "single" image

Expected behavior

Here is how Which-key looks with border transparent image

Telescope plugin image

Steps to reproduce

  1. Install xiyaowong/transparent.nvim and enable it
  2. Default config I use
    
    local M = {
    "xiyaowong/transparent.nvim",
    }

function M.config() require("transparent").setup({ -- Optional, you don't have to run setup. groups = { -- table: default groups 'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier', 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function', 'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText', 'SignColumn', 'CursorLine', 'CursorLineNr', 'StatusLine', 'StatusLineNC', 'EndOfBuffer', }, extra_groups = { "NvimTreeNormal", "NormalFloat", "NvimTreeEndOfBuffer", "StatusLine", 'StatusLineNC', "WhichKeyBorder", }, -- table: additional groups that should be cleared exclude_groups = {}, -- table: groups you don't want to clear }) end return M

3. Colorscheme with `transparent = true`
```lua
local M = {
  "navarasu/onedark.nvim",
  lazy = false,
  priority = 1000,
}
function M.config()
  require("onedark").setup({
    transparent = true,
    style = "warmer",
    -- lualine = {
    --     transparent = true, -- lualine center bar transparency
    -- },
  })
  vim.cmd.colorscheme "onedark"
end
return M

Neovim version (>= 0.7)

NVIM v0.9.5 Build type: RelWithDebInfo LuaJIT 2.1.1703942320 Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe /MD /Zi /O2 /Ob1 -W3 -wd4311 -wd4146 -DUNIT_TESTING -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602 -DMSWIN -DINCLUDE_GENERATED_DECLARATIONS -ID:/a/neovim/neovim/.deps/usr/include/luajit-2.1 -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include -ID:/a/neovim/neovim/build/cmake.config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include -ID:/a/neovim/neovim/.deps/usr/include

system vimrc file: "$VIM\sysinit.vim" fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Operating system/version

Window 11

Healthcheck output

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-01-29-mighty-break` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
`
- WARNING wget: not available
  - ADVICE:
    - spawn: wget failed with exit code - and signal -. wget is not executable
- OK curl: `curl 8.4.0 (Windows) libcurl/8.4.0 Schannel WinIDN
`
- OK gzip: `gzip.exe" 1.3.12`
- OK tar: `bsdtar 3.6.2 - libarchive 3.6.2 zlib/1.2.5.f-ipp liblzma/5.2.5 bz2lib/1.0.8 libzstd/1.5.4 
`
- OK pwsh: `7.4.1 Microsoft Windows 10.0.22631 Win32NT
`
- OK 7z: `7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20
`

Screenshots

No response

neilfranci commented 8 months ago

nvm, I just need to put the add "FloatBorder" to extra_group or put vim.api.nvim_set_hl(0, "FloatBorder", { bg = "None" } command somewhere. This means it's global, But I also want to have a way to enable border transparency for some plugins only, not the whole.