mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
patch 9.1.1835: completion: not possible to style popup borders globally
Problem: not possible to style popup borders globally Solution: Add the 'pumborder' option (Girish Palya) This commit introduces a new global option, 'pumborder' ('pb'), that allows users to define borders and optional decorations for the completion popup menu. ``` Defines a border and optional decorations for the popup menu in completion. The value is a comma-separated list of keywords. Border styles (at most one): "single"singleuse thin box-drawing characters "double"doubleuse double-line box-drawing characters "round"rounduse rounded corners "ascii"asciiuse ASCII characters (-, |, +) "custom:XXXXXXXX" use eight characters given after "custom:", in order: top, right, bottom, left, topleft, topright, botright, botleft Additional flags: "margin"marginadds one-cell spacing inside the left and right border "shadow"shadowdraws a shadow at the right and bottom edges Highlight groups: |hl-PmenuBorder|hl-PmenuBorderused for the border characters |hl-PmenuShadow|hl-PmenuShadowused for the shadow Examples: > :set pumborder=single :set pumborder=double,margin,shadow :set pumborder=custom:─│─│┌┐┘└,shadow Border styles using box-drawing characters ("single", "double", "round") are only available when |'encoding'| is "utf-8" and |'ambiwidth'| is "single". "margin" requires a border style. See also: |ins-completion-menu|. ``` fixes: https://github.com/vim/vim/pull/18441#issuecomment-3360188458 closes: #18486 closes: #17091 Signed-off-by: Girish Palya <girishji@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
2c09368273
commit
474b981e40
@@ -1574,6 +1574,8 @@ typedef enum
|
||||
, HLF_PSX // popup menu selected item "menu" (extra text)
|
||||
, HLF_PSB // popup menu scrollbar
|
||||
, HLF_PST // popup menu scrollbar thumb
|
||||
, HLF_PMB // popup menu border
|
||||
, HLF_PMS // popup menu shadow
|
||||
, HLF_TP // tabpage line
|
||||
, HLF_TPS // tabpage line selected
|
||||
, HLF_TPF // tabpage line filler
|
||||
@@ -1597,7 +1599,7 @@ typedef enum
|
||||
'n', 'a', 'b', 'N', 'G', 'O', 'r', 's', 'S', 'c', 't', 'v', 'V', \
|
||||
'w', 'W', 'f', 'F', 'A', 'C', 'D', 'T', 'E', '-', '>', \
|
||||
'B', 'P', 'R', 'L', \
|
||||
'+', '=', 'k', '<','[', ']', '{', '}', 'x', 'X', \
|
||||
'+', '=', 'k', '<','[', ']', '{', '}', 'x', 'X', 'j', 'H', \
|
||||
'*', '#', '_', '!', '.', 'o', 'q', \
|
||||
'z', 'Z', 'g', \
|
||||
'%', '^', '&', 'I'}
|
||||
|
Reference in New Issue
Block a user