How do I make the completion popup menu semi-transparent in Neovim?
Answer
set pumblend=10
Explanation
Neovim supports pseudo-transparency for the completion popup menu via pumblend and for floating windows via winblend. Setting these to a non-zero value lets you see the underlying text through popups, which can make the editing context easier to read.
How it works
pumblend is a global option (0–100) controlling the transparency of the completion popup menu:
set pumblend=10
Or in Lua:
vim.opt.pumblend = 10
winblend is a window-local option for floating windows. To apply it as a default to all new floating windows, use an autocommand:
autocmd FileType * lua vim.api.nvim_win_call(0, function()
if vim.api.nvim_win_get_config(0).relative ~= '' then
vim.wo.winblend = 10
end
end)
Or set it directly when you open a floating window via the API:
vim.api.nvim_open_win(bufnr, false, { relative='cursor', winblend=15, ... })
- 0 = fully opaque (default)
- 100 = fully transparent
- 10–20 = a subtle, readable effect
Example
With set pumblend=15 active, pressing <C-n> opens the completion menu with a slight transparency, making the surrounding code visible behind it.
Tips
- Values above 30 tend to make the popup hard to read; 10–20 is the sweet spot
- This is a terminal feature — it requires true-color support (
set termguicolors) - Plugin floating windows (telescope, LSP hover) also accept
winblendwhen configured in their setup options - Pair with a theme that has a translucent popup background color for best results