[vim/vim] Implement opacity for popups (PR #19272)

8 views
Skip to first unread message

mattn

unread,
Jan 29, 2026, 6:27:23 AM (7 days ago) Jan 29
to vim/vim, Subscribed

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.png (view on web) image.png (view on web)

https://github.com/user-attachments/assets/cd8c2f9e-f6f5-42c6-b7c1-ef7e82fcfb71

### 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

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19272

Commit Summary

  • 0084a1a Implement opacity for popups

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19272@github.com>

mattn

unread,
Jan 29, 2026, 6:31:29 AM (7 days ago) Jan 29
to vim/vim, Push

@mattn pushed 1 commit.

  • 4191f25 Implement opacity for popups


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19272/before/0084a1a43d1f528b329f9c7e2240552ee73eaa32/after/4191f25e59a11b3d0f745e9018e8d643f447f1ff@github.com>

mattn

unread,
Jan 29, 2026, 6:37:27 AM (7 days ago) Jan 29
to vim/vim, Push

@mattn pushed 1 commit.

  • 775e56c Implement opacity for popups

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19272/before/4191f25e59a11b3d0f745e9018e8d643f447f1ff/after/775e56cc37135549c2971f053186c75cb697a042@github.com>

mattn

unread,
Jan 31, 2026, 7:24:47 AM (4 days ago) Jan 31
to vim/vim, Push

@mattn pushed 1 commit.

  • 71aec12 Fix popup opacity reset when calling popup_setoptions with other options

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19272/before/775e56cc37135549c2971f053186c75cb697a042/after/71aec121ae629faca14a65c24e07b8846ebae38a@github.com>

mattn

unread,
7:20 AM (12 hours ago) 7:20 AM
to vim/vim, Push

@mattn pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19272/before/71aec121ae629faca14a65c24e07b8846ebae38a/after/e4ad85fc452d7ae7b89b9d9e08ab00baea5ab498@github.com>

Reply all
Reply to author
Forward
0 new messages