aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt10
-rw-r--r--runtime/lua/vim/_meta/options.lua13
-rw-r--r--runtime/optwin.vim2
3 files changed, 25 insertions, 0 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 2a8eb50acd..fd0b453ffe 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1529,6 +1529,16 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'completeitemalign'* *'cia'*
+'completeitemalign' 'cia' string (default "abbr,kind,menu")
+ global
+ A comma-separated list of |complete-items| that controls the alignment
+ and display order of items in the popup menu during Insert mode
+ completion. The supported values are abbr, kind, and menu. These
+ options allow to customize how the completion items are shown in the
+ popup menu. Note: must always contain those three values in any
+ order.
+
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default "menu,preview")
global or local to buffer |global-local|
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 76715e1d9b..04e573c3ed 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -1055,6 +1055,19 @@ vim.o.cfu = vim.o.completefunc
vim.bo.completefunc = vim.o.completefunc
vim.bo.cfu = vim.bo.completefunc
+--- A comma-separated list of `complete-items` that controls the alignment
+--- and display order of items in the popup menu during Insert mode
+--- completion. The supported values are abbr, kind, and menu. These
+--- options allow to customize how the completion items are shown in the
+--- popup menu. Note: must always contain those three values in any
+--- order.
+---
+--- @type string
+vim.o.completeitemalign = "abbr,kind,menu"
+vim.o.cia = vim.o.completeitemalign
+vim.go.completeitemalign = vim.o.completeitemalign
+vim.go.cia = vim.go.completeitemalign
+
--- A comma-separated list of options for Insert mode completion
--- `ins-completion`. The supported values are:
---
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index f168218c91..da70ff1afe 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -726,6 +726,8 @@ if has("insert_expand")
call <SID>OptionL("cpt")
call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion"))
call <SID>OptionL("cot")
+ call <SID>AddOption("completeitemalign", gettext("popup menu item align order"))
+ call <SID>OptionG("cia", &cia)
call <SID>AddOption("pumheight", gettext("maximum height of the popup menu"))
call <SID>OptionG("ph", &ph)
call <SID>AddOption("pumwidth", gettext("minimum width of the popup menu"))