Open yyoncho opened 4 years ago
That sounds like company-auto-complete-chars
(which can be set to a function).
But since you intend to go the c-a-p-f route, direct integration with company seems ill-advised. So maybe that should be some extra property on the list returned by the completion function. That would need some thought.
I use company-show-numbers
all the time: If enabled, show quick-access numbers for the first ten candidates.
Although you need to press Alt-<num>
instead of some char.
@kiennq company-auto-complete-chars
does not work on our side. The issue is that when the completion is over we restore the initial state of the buffer(at the time of completion request) which deletes the trigger character.
Some potential fixes:
I think this is a very useful feature, especially when auto-complete chars are provided by context-aware service.
This is something that we are missing from 3.14 support. When declared, each CompletionItem will have a list of chars which once pressed will insert the item. I was unable to find something in company-mode that corresponds directly to that feature(cc @dgutov), but potentially the feature might be implemented in the upstream and wired in lsp-mode.
cc @kiennq