Adding a new variant for autocompletion #1058
Answered
by
L3MON4D3
wojciech-kulik
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
L3MON4D3
Nov 14, 2023
Replies: 1 comment 4 replies
-
Hi! The regular approach to changing the snippet manually like that would be a choiceNode, which means you couldn't use I guess the other issue is intercepting the completion-result from nvim-cmp/lsp.. do you know where the snippet for the function is coming from? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, okay, then this is a bit tricky:
You'd have to intercept the results from lsp and modify them, I do something like that to solve a pretty similar problem (for c++, add a choiceNode to toggle between
()
and{}
).But true, manual text-transformations are probablem way more KISS :D