-
Notifications
You must be signed in to change notification settings - Fork 199
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
Restore behaviour for attributes when single server support is off #8653
Conversation
@@ -36,6 +36,8 @@ internal abstract class AbstractRazorDelegatingEndpoint<TRequest, TResponse> : I | |||
Logger = logger ?? throw new ArgumentNullException(nameof(logger)); | |||
} | |||
|
|||
protected bool SingleServerSupport => _languageServerFeatureOptions.SingleServerSupport; |
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.
How is SingleServerSupport different from OnlySingleServer?
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.
SingleServerSupport means "this client supports delegating requests to downstream language servers"
Normally these endpoints handle Razor contexts, and then if SingleServerSupport is on, they also can delegate to C# or HTML for those contexts. OnlySingleServer means "this endpoint should not run at all if SingleServerSupport isn't on". I think only one endpoint actually uses it, and I'm hoping to remove it in a future update to all of this stuff :D
// If we were trying to navigate to a property, and we couldn't find it, we can at least take | ||
// them to the file for the component. If the property was defined in a partial class they can | ||
// at least then press F7 to go there. | ||
return new Range { Start = new Position(0, 0), End = new Position(0, 0) }; |
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.
I'm surprised we don't have a Range.Zero
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.
Sadly, its not our type, but maybe a future C# version will allow extension everything :D
Fixes #8624
I broke Go To Def and Hover by making it smarter, but the smartness only works if we are delegating to other servers from ours, which is not always true. This restores the previous behaviour in those cases (ie, when single server is off)