Skip to content

Turn off all backends except snippets in Tab stop fields #1377

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

You must be logged in to vote

Using let-binding as in your example doesn't work because yas-expand-snippet exits right after it inserts the template with all the necessary structures into the buffer, so that snippet expansion works, but before you're able continue typing, initiate completion, etc.

To exclude all completions except yasnippet's, you could set company-backends to '(company-yasnippet) (a simpler value than in your example, though yours should also work). Maybe do it buffer-locally (see setq-local), to avoid affecting other buffers. Depending on whether the value is buffer-local already, you could back up the previous value to some new var, to be able to restore it later.

To do this alteration temporarily …

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rickalex21
Comment options

You must be logged in to vote
1 reply
@dgutov
Comment options

Comment options

You must be logged in to vote
1 reply
@dgutov
Comment options

Comment options

You must be logged in to vote
1 reply
@dgutov
Comment options

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