From efa664c7ed21b63f2cf0a8caa53161fe7e32b2bb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 30 Jan 2025 14:39:13 +0800 Subject: vim-patch:9.1.1056: Vim doesn't highlight to be inserted text when completing (#32251) Problem: Vim doesn't highlight to be inserted text when completing Solution: Add support for the "preinsert" 'completeopt' value (glepnir) Support automatically inserting the currently selected candidate word that does not belong to the latter part of the leader. fixes: vim/vim#3433 closes: vim/vim#16403 https://github.com/vim/vim/commit/edd4ac3e895ce16034c7e098f1d68e0155d97886 Co-authored-by: glepnir --- runtime/lua/vim/_meta/options.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index f0f0d1a768..452959970d 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1102,6 +1102,12 @@ vim.go.cia = vim.go.completeitemalign --- scores when "fuzzy" is enabled. Candidates will appear --- in their original order. --- +--- preinsert +--- Preinsert the portion of the first candidate word that is +--- not part of the current completion leader and using the +--- `hl-ComplMatchIns` highlight group. Does not work when +--- "fuzzy" is also included. +--- --- @type string vim.o.completeopt = "menu,preview" vim.o.cot = vim.o.completeopt -- cgit