Closed galeo closed 2 years ago
Oh it seems we call the post completion action with a wrong argument. Maybe a text property is missing? I've tested other Company backends but didn't try yasnippet. The adapter is still experimental. Personally I am not using yasnippet. Maybe you can help me figure this out?
According to company.el:
`post-completion': Called after a completion candidate has been inserted into the buffer. The second argument is the candidate. Can be used to modify it, e.g. to expand a snippet.
I pushed a potential fix in https://github.com/minad/cape/commit/9db78299616bab3c601ace2bcab205c9fbff8dd0. Instead of calling post-completion
with the actual candidate, I called it with the buffer contents like the Capf does. Therefore we missed the text property as I suspected. Please give the patch a try. I didn't test it.
It works well now. Thanks.
Thanks for the company adapter
cape-company-to-capf
. I tried to use it withcompany-yasnippet
after reading #17, but encountered an error.In
*scratch*
buffer, turn on corfu and execute code:Type
auto
and select the completion candidate (auto→autoload
), it reports the error:Here is the Backtrace log:
The snippet can not be auto expanded in post completion action. It can be expanded manually.