mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
Merge pull request #33114 from zeertzjq/vim-9.1.1250
vim-patch:9.1.{1250,1255,1257}: 'pummaxwidth'
This commit is contained in:
@@ -79,6 +79,7 @@ LUA
|
||||
OPTIONS
|
||||
|
||||
• 'diffopt' `inline:` configures diff highlighting for changes within a line.
|
||||
• 'pummaxwidth' sets maximum width for the completion popup menu.
|
||||
|
||||
PLUGINS
|
||||
|
||||
|
||||
@@ -4623,6 +4623,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Maximum number of items to show in the popup menu
|
||||
(|ins-completion-menu|). Zero means "use available screen space".
|
||||
|
||||
*'pummaxwidth'* *'pmw'*
|
||||
'pummaxwidth' 'pmw' number (default 0)
|
||||
global
|
||||
Maximum width for the popup menu (|ins-completion-menu|). When zero,
|
||||
there is no maximum width limit, otherwise the popup menu will never be
|
||||
wider than this value. Truncated text will be indicated by "..." at the
|
||||
end. Takes precedence over 'pumwidth'.
|
||||
|
||||
*'pumwidth'* *'pw'*
|
||||
'pumwidth' 'pw' number (default 15)
|
||||
global
|
||||
|
||||
11
runtime/lua/vim/_meta/options.lua
generated
11
runtime/lua/vim/_meta/options.lua
generated
@@ -4802,6 +4802,17 @@ vim.o.ph = vim.o.pumheight
|
||||
vim.go.pumheight = vim.o.pumheight
|
||||
vim.go.ph = vim.go.pumheight
|
||||
|
||||
--- Maximum width for the popup menu (`ins-completion-menu`). When zero,
|
||||
--- there is no maximum width limit, otherwise the popup menu will never be
|
||||
--- wider than this value. Truncated text will be indicated by "..." at the
|
||||
--- end. Takes precedence over 'pumwidth'.
|
||||
---
|
||||
--- @type integer
|
||||
vim.o.pummaxwidth = 0
|
||||
vim.o.pmw = vim.o.pummaxwidth
|
||||
vim.go.pummaxwidth = vim.o.pummaxwidth
|
||||
vim.go.pmw = vim.go.pummaxwidth
|
||||
|
||||
--- Minimum width for the popup menu (`ins-completion-menu`). If the
|
||||
--- cursor column + 'pumwidth' exceeds screen width, the popup menu is
|
||||
--- nudged to fit on the screen.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Mar 07
|
||||
" Last Change: 2025 Mar 28
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@@ -736,6 +736,8 @@ if has("insert_expand")
|
||||
call <SID>OptionG("ph", &ph)
|
||||
call <SID>AddOption("pumwidth", gettext("minimum width of the popup menu"))
|
||||
call <SID>OptionG("pw", &pw)
|
||||
call <SID>AddOption("pummaxwidth", gettext("maximum width of the popup menu"))
|
||||
call <SID>OptionG("pmw", &pmw)
|
||||
call <SID>AddOption("completefunc", gettext("user defined function for Insert mode completion"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cfu")
|
||||
|
||||
Reference in New Issue
Block a user