I am working on a Visual Studio custom editor extension and I need to update it for VS2022 (it was created for VS2013). In VS2013, when i click on a line, I can see an indentation indicator at the beginning of the line. When hovering over the indicator, a tooltip appears that allows me to align the line or to cleanup the entire document.
(Indicator and Tooltip).
This does not work in VS2022. The only reference to the line format is inside of an ICompletionSource class:
class CustomCompletionSource : ICompletionSource
{
...
public void AugmentCompletionSession(ICompletionSession session, IList<CompletionSet> completionSets)
{
...
foreach (var parameter in parameters)
{
snippet += string.Format(" {0,-32}=", parameter.Name);
...
snippet += ";n";
}
while (start > line.Start && !char.IsWhiteSpace((start - 1).GetChar()))
{
start -= 1;
}
var applicableTo = snapshot.CreateTrackingSpan(new SnapshotSpan(start, triggerPoint), SpanTrackingMode.EdgeInclusive);
completionSets.Add(new CompletionSet("All", "All", applicableTo, completions, Enumerable.Empty<Completion>()));
}
}
What is the cause of this and how can I make the tooltip appear in VS2022?
asylvain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.