Skip to content
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

add proposed selectionRange API #102

Merged
merged 1 commit into from
Apr 21, 2019
Merged

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Mar 27, 2019

This is the proposes extension to the protocol, which looks like it's going to be stabilized soon.

See microsoft/vscode-languageserver-node#474

Let's not merge the PR until it is set in stone though

src/request.rs Outdated
@@ -108,6 +108,9 @@ macro_rules! lsp_request {
("textDocument/typeDefinition") => {
$crate::request::GotoTypeDefinition
};
("textDocument/selectionRange") => {
$crate::request::SelectionRange
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be SelectionRangeRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah...

I hate how some of these are XRequest and some are just X, but this inconsistent naming comes from the protocol itself.

I wonder if "maintaining consistency with inconsistent protocol" is worth it...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever makes it easier I think. I'd recommend using the macros to refer to them in most cases anyway since that reflects their actual RPC name. So the name of the underlying type shouldn't matter most of the time.

@matklad matklad force-pushed the selection-range branch 3 times, most recently from 9878f00 to 6e37d45 Compare April 21, 2019 08:58
@matklad matklad marked this pull request as ready for review April 21, 2019 09:20
@matklad
Copy link
Contributor Author

matklad commented Apr 21, 2019

@Marwes marked as ready for review: the protocol extension is still provisional, but is released and usable:

microsoft/language-server-protocol#613 (comment)

Copy link
Member

@Marwes Marwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #103 we added a proposed feature as a way to opt-in to addition not yet in the space. If you could hide this changes behind a cfg then this looks good to me.

@matklad
Copy link
Contributor Author

matklad commented Apr 21, 2019

Good idea, fixed!

@Marwes Marwes merged commit df69032 into gluon-lang:master Apr 21, 2019
@Marwes
Copy link
Member

Marwes commented Apr 21, 2019

Released as 0.57.1

@matklad matklad deleted the selection-range branch April 21, 2019 12:18
@ehuss
Copy link

ehuss commented Apr 30, 2019

It seems like this is a semver breaking change? rls can't build with 0.57.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants