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

Implement textDocument/selectionRange #1092

Merged
merged 9 commits into from
Jun 6, 2020
Merged

Conversation

rwols
Copy link
Member

@rwols rwols commented Jun 4, 2020

An LSP alternative to Sublime's own "Expand Selection".

Peek 2020-06-04 21-09

@rwols rwols added protocol updates Issues related to changes in the LSP protocol. Usually because we're out-of-date. sublime-text-4000 labels Jun 4, 2020
rwols added 2 commits June 4, 2020 22:34
And add a test for it in test_single_document.py
@rwols
Copy link
Member Author

rwols commented Jun 4, 2020

It seems vscode-css and vscode-json are also selectionRangeProviders:

Peek 2020-06-04 23-40

@rwols
Copy link
Member Author

rwols commented Jun 4, 2020

For JSON it's not much different or better than ST's built-in expand selection to be honest.

plugin/selection_range.py Outdated Show resolved Hide resolved
plugin/selection_range.py Outdated Show resolved Hide resolved
plugin/selection_range.py Outdated Show resolved Hide resolved
tests/test_single_document.py Outdated Show resolved Hide resolved
rwols added 3 commits June 6, 2020 22:02
We will revert to the built-in Expand Selection if there's no
selectionRangeProvider found.
… keybinding when the server is not a selectionRangeProvider"

This reverts commit eddda96.
@rwols rwols merged commit 4655183 into st4000-exploration Jun 6, 2020
@rwols rwols deleted the expand-selection branch June 6, 2020 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol updates Issues related to changes in the LSP protocol. Usually because we're out-of-date.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants