Closed roxma closed 6 years ago
Check out lsp-sample:
You can add additionalTextEdits
in onCompletion
or onCompletionResolve
.
Or are you saying vls should provide some additionalTextEdits
?
@octref
Thaks for the reply.
are you saying vls should provide some additionalTextEdits?
I'm saying when vls will send additionalTextEdits
for completion. I need a specific user-end use case.
I noticed that there's autoImport in vetur configuration. Perhaps this is what additionalTextEdits
is used for. But I don't know how to trigger autoImport. Where can I find the demo for this feature?
"completion": {
"autoImport": true,
"useScaffoldSnippets": true
},
I see. Here's a gif. You can try it in this project: https://github.com/Microsoft/language-server-protocol-inspector
Meanwhile you might find this Inspector useful: https://microsoft.github.io/language-server-protocol/inspector
You can set vetur.trace.server: "verbose"
and save the log somewhere, then load it in the inspector to analyze it.
@octref Thanks for your help
This is what I've been working on:
@roxma Very nice, the only thing I'm missing from VS Code is consistent Vim commands :p
I'm testing vls, LanguageClient-neovim and ncm2, with either ncm2-snipmate or ncm2-ultisnips
Currently snippets like
attr="$1"$0
works wellBut I want to add
additionalTextEdits
supports too. I don't know how to trigger this kind of completion. So I'm asking here for a use case that I can start to work with.