-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround vscode bug with returning defaultBehavior from prepareRename #70840
Conversation
DefaultBehavior = true, | ||
}; | ||
var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); | ||
return ProtocolConversions.TextSpanToRange(symbolicRenameInfo.TriggerToken.Span, text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The range here is the initial range to replace - the client takes this range to prefill the rename dialog with the identifier to rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you test that this works properly with things like @foo
and we don't get weirdness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, so neither VS nor VS Code handle that response type? So glad we have a spec 😛 |
VSCode bug here - microsoft/vscode-languageserver-node#1363
Returning an explicit range instead of defaultBehavior works.
Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1916980