Skip to content

How to check whether the currently selected candidate is from a specific backend? #1267

Answered by dgutov
kings2u asked this question in Q&A
Discussion options

You must be logged in to vote

I've noticed that if I select a candidate from the company-yasnippet backend using company-complete-selection, the default text for the first field of the Yasnippet snippet will unfortunately be deleted.

Do you have an example of such problematic snippet? Ideally point out one of the snippets from https://github.com/AndreaCrotti/yasnippet-snippets, since it's the common collection to have installed.

How can I programmatically check whether the currently selected candidate is from the company-yasnippet backend?

If you know how to read the definition of company-lighter, you could adopt its logic.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kings2u
Comment options

@dgutov
Comment options

@kings2u
Comment options

Answer selected by kings2u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants