Skip to content
Discussion options

You must be logged in to vote

Oh, this could be done by writing a custom nvim-cmp-source (actually not that hard!!). Probably way too overkill, but it seems like a perfect solution.
But for practical purposes, using snippets with the same prefix, as @atticus-sullivan suggests, makes more sense since it will most likely work just as well with the regular snippet-completion from cmp_luasnip

Alternatively, you can use condition and show_condition to check whether the characters before the trigger match "data\", and then allow or prevent expansion/completion.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@PhosCity
Comment options

@atticus-sullivan
Comment options

Comment options

You must be logged in to vote
4 replies
@PhosCity
Comment options

@L3MON4D3
Comment options

@PhosCity
Comment options

@L3MON4D3
Comment options

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