vimtricks.wiki Concise Vim tricks, one at a time.

How do I make Vim's completion popup menu partially transparent so I can see text behind it?

Answer

:set pumblend=10

Explanation

Neovim's 'pumblend' option controls the pseudo-transparency of the insert-mode completion popup menu (and other floating windows). Setting it to a value between 1 and 100 lets underlying text show through, so you can read context behind the menu without dismissing it.

How it works

  • 'pumblend' accepts an integer from 0 (fully opaque, default) to 100 (fully transparent)
  • A value around 1020 gives a subtle tint that is easy to read
  • The effect is rendered using terminal blending — it requires a terminal with true-color support
  • Also controls the transparency of other floating windows (LSP hover, diagnostics) when set via 'winblend' per-window

Example

" In init.vim or vimrc
set pumblend=15

Or in Lua (init.lua):

vim.opt.pumblend = 15

Tips

  • 'pumblend' affects the global default; set winblend on individual floating windows for finer control
  • For full effect, make sure your terminal reports $COLORTERM=truecolor and your Neovim colorscheme supports guibg colors
  • Set pumblend=0 to restore opaque menus if the transparency is distracting
  • Note: this option is Neovim-only and has no effect in Vim

Next

How do I programmatically read and write Vim register contents including their type from Vimscript?