Skip to content

Implement opacity for popups#19272

Open
mattn wants to merge 3 commits intovim:masterfrom
mattn:popup-opacity
Open

Implement opacity for popups#19272
mattn wants to merge 3 commits intovim:masterfrom
mattn:popup-opacity

Conversation

@mattn
Copy link
Member

@mattn mattn commented Jan 29, 2026

Popup windows in Vim currently have no transparency support. Users cannot create semi-transparent overlays that allow underlying text to be visible through the popup.

So, add a new opacity option for popup windows that controls transparency level.

image image
2026-01-29.130110.mp4
### Usage

```vim
" Create a popup with 50% opacity (semi-transparent)
let winid = popup_create('Semi-transparent text', #{
    \ line: 5,
    \ col: 10,
    \ opacity: 50,
    \ })

" Change opacity dynamically
call popup_setoptions(winid, #{opacity: 80})

" Get current opacity value
echo popup_getoptions(winid).opacity

Opacity values

  • 0 - Fully transparent (background text fully visible)
  • 100 - Fully opaque (default, no transparency)
  • 1-99 - Partially transparent

Requirements

  • Requires 'termguicolors' to be enabled for the blending effect to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants