Add ~
to completion items when insert-text
#3209
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a simple modification to enhance completion doing the same neovim does, showing a
~
on the end of the completion item if it will insert some kind of text rather than just thelabel
, this is useful to user know that this completion item will do something other than just complete with the label.Note: We can't rely only on snippet kind since it's possible and IMO makes sense for example to return a completion item saying that an item is of type function but will insert some other kind of text like clojure and rust, example:
lsp-mode

neovim

c/c @kiennq @yyoncho
For curiosity, I realized that on this issue