Snippet session gets started on opening bracket #1915
-
Contributing guidelines
Module(s)mini.snippets QuestionHi there. I have a question about snippet sessions. In my case a snippet session is started, as soon as I type an opening bracket. For example (Golang source):
I type all letters to the first bracket ( (which triggers a auto close) and the session is started inside the brackets. The snippet plugin is configured as follows:
Inside my I'm not sure if its a bug or if I'm using the plugin the wrong way. Can please someone help? Thanks :) ... And thanks for the great mini plugins, I really appreciate them! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This looks like you are using completion engine and this is a result of an accepting snippet completion candidate from LSP. This can happen if completion engine has "autoselect" feature - then pressing I indeed see this with mini-snippets-in-lsp.mp4The first time there is no snippet session because completion candidate is not explicitly chosen (as is with default 'mini.completion' setup) and autopair comes from 'mini.pairs' module. The second time it is explicitly chosen, so pressing So all in all, this does seem to be an expected behavior because LSP provides the completion candidate as a snippet of the form
Does this answer the question? If not, try to disable LSP and try to reproduce.
❤️ |
Beta Was this translation helpful? Give feedback.
This looks like you are using completion engine and this is a result of an accepting snippet completion candidate from LSP. This can happen if completion engine has "autoselect" feature - then pressing
(
might "confirm" the selection which starts snippet session. Do you use completion engine and (if yes) which one?I indeed see this with
fmt.Printf()
+gopls
and 'mini.completion'. Here is the behavior:mini-snippets-in-lsp.mp4
The first time there is no snippet session because completion candidate is not explicitly chosen (as is with default 'mini.completion' setup) and autopair comes from 'mini.pairs' module. The second time it is explicitly chosen, so pressing
(
leads to confir…