question

EtienneLefebvre-3643 avatar image
0 Votes"
EtienneLefebvre-3643 asked EtienneLefebvre-3643 commented

InsertText property of CompletionItem (Visual Studio Intellisense extension) doesn't work as expected

In the 2019 VS SDK, the CompletionItem class (from the namespace Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data, assembly Microsoft.VisualStudio.Language.dll) has a property called InsertText that should define the text to be inserted when commiting this suggestion/CompletionItem.
However, the current behavior is that this property doesn't seem to be used and the text inserted is the DisplayText property. The DisplayText property should only define what is seen in the UI, as per the doc.

I'm getting this behavior with the sample code found here and with an extension I'm writing (extending Intellisense for C#).
I would like to be able to have the DisplayText different of the InsertText, so the DisplayText can contain some small bonus info inside parentheses for example.


dotnet-csharpvs-extensions
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I didn't realize I could ask there, thank you!

0 Votes 0 ·

0 Answers