mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 09:01:57 +00:00
vim-patch:9.2.1001: complete_info() does not report the item highlight groups (#41461)
Problem: complete_info() omits "abbr_hlgroup" and "kind_hlgroup".
Solution: Keep the highlight group ID with the match instead of the
resolved attribute and add both entries to the returned items
(glepnir).
closes: vim/vim#21105
1c32cede0a
This commit is contained in:
@@ -1247,13 +1247,15 @@ items:
|
||||
|hl-PmenuMatchSel| and |hl-PmenuMatch| highlight
|
||||
attributes in the popup menu to apply cterm and gui
|
||||
properties (with higher priority) like strikethrough
|
||||
to the completion items abbreviation
|
||||
to the completion items abbreviation.
|
||||
The group can be defined later.
|
||||
kind_hlgroup an additional highlight group specifically for setting
|
||||
the highlight attributes of the completion kind. When
|
||||
this field is present, it will override the
|
||||
|hl-PmenuKind| highlight group, allowing for the
|
||||
customization of ctermfg and guifg properties for the
|
||||
completion kind
|
||||
completion kind.
|
||||
The group can be defined later.
|
||||
match See "matches" in |complete_info()|.
|
||||
preselect when non-zero this item is selected by default in the
|
||||
popup menu. Only if 'completeopt' has "preselect". If
|
||||
|
||||
@@ -1320,10 +1320,13 @@ complete_info([{what}]) *complete_info()*
|
||||
the currently selected index item.
|
||||
items List of all completion candidates. Each item
|
||||
is a dictionary containing the entries "word",
|
||||
"abbr", "menu", "kind", "info" and
|
||||
"user_data". "equal", "preselect" and
|
||||
"commit_chars" are included only for items that
|
||||
set them.
|
||||
"abbr", "menu", "kind", "info",
|
||||
"abbr_hlgroup", "kind_hlgroup" and
|
||||
"user_data". The highlight group entries hold
|
||||
the name that the item was added with,
|
||||
or an empty string.
|
||||
"equal", "preselect" and "commit_chars" are
|
||||
included only for items that set them.
|
||||
See |complete-items|.
|
||||
matches Same as "items", but only returns items that
|
||||
are matching current query. If both "matches"
|
||||
|
||||
11
runtime/lua/vim/_meta/vimfn.gen.lua
generated
11
runtime/lua/vim/_meta/vimfn.gen.lua
generated
@@ -1139,10 +1139,13 @@ function vim.fn.complete_check() end
|
||||
--- the currently selected index item.
|
||||
--- items List of all completion candidates. Each item
|
||||
--- is a dictionary containing the entries "word",
|
||||
--- "abbr", "menu", "kind", "info" and
|
||||
--- "user_data". "equal", "preselect" and
|
||||
--- "commit_chars" are included only for items that
|
||||
--- set them.
|
||||
--- "abbr", "menu", "kind", "info",
|
||||
--- "abbr_hlgroup", "kind_hlgroup" and
|
||||
--- "user_data". The highlight group entries hold
|
||||
--- the name that the item was added with,
|
||||
--- or an empty string.
|
||||
--- "equal", "preselect" and "commit_chars" are
|
||||
--- included only for items that set them.
|
||||
--- See |complete-items|.
|
||||
--- matches Same as "items", but only returns items that
|
||||
--- are matching current query. If both "matches"
|
||||
|
||||
Reference in New Issue
Block a user