0
0
mirror of https://github.com/vim/vim.git synced 2025-10-12 06:44:06 -04:00

patch 9.1.0754: fixed order of items in insert-mode completion menu

Problem:  fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
          value "abbr,kind,menu" (glepnir).

Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.

closes: #14006
closes: #15760

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
glepnir
2024-10-01 20:32:12 +02:00
committed by Christian Brabandt
parent e021f39b79
commit 6a89c94a9e
20 changed files with 326 additions and 41 deletions

View File

@@ -653,6 +653,10 @@ static struct vimoption options[] =
{(char_u *)0L, (char_u *)0L}
#endif
SCTX_INIT},
{"completeitemalign", "cia", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
(char_u *)&p_cia, PV_NONE, did_set_completeitemalign, NULL,
{(char_u *)"abbr,kind,menu", (char_u *)0L}
SCTX_INIT},
{"completeopt", "cot", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP,
(char_u *)&p_cot, PV_COT, did_set_completeopt, expand_set_completeopt,
{(char_u *)"menu,preview", (char_u *)0L}