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.
https://github.com/vim/vim/pull/21105
(4 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
But why? Why do you need to know the group name of the highlight group from the completion menu? That seems unnecessary, a plugin already knows what highlighting it specified for the completion, so I am guessing it doesn't need to capture this information again.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Because the plugin refreshing the list isn't always the one that made it. LSP servers send isIncomplete=true, so the client re-queries and calls complete() again on nearly every keystroke — and matches from the other 'complete' sources have to be read back with complete_info() and passed along. Everything survives that round trip except abbr_hlgroup and kind_hlgroup. They're the only keys complete() takes that you can't read back.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Because the plugin refreshing the list isn't always the one that made it. LSP servers send isIncomplete=true, so the client re-queries and calls complete() again on nearly every keystroke — and matches from the other 'complete' sources have to be read back with complete_info() and passed along. Everything survives that round trip except abbr_hlgroup and kind_hlgroup. They're the only keys complete() takes that you can't read back.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
The round trip does not survive a highlight group that is not defined yet.
get_user_highlight_id() calls syn_name2id(), which returns 0 for a name no
:highlight has created, and syn_id2name(0) is an empty string. So an item
passed to complete() with abbr_hlgroup: 'MyKind' comes back from
complete_info() with an empty abbr_hlgroup, and feeding it back in drops
the highlight. A client that links its groups with :highlight default link
when it loads, or leaves them to the user, runs into this. The added test uses
Title and SpecialKey, which already exist, so it does not cover it.
Keeping the name instead of the ID would not have that hole.
One more thing: holding the ID rather than the resolved attribute means the
menu now follows a :highlight issued after complete(). That looks like an
improvement, but it is a behaviour change and it is not in the commit message
or the docs.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Updated, switched to syn_check_group() so an undefined group keeps its name, and documented the late lookup.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
okay, fine thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()