Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Initial support added for textDocument/documentHighlight #1767

Merged
merged 6 commits into from
Mar 18, 2020

Conversation

astenman
Copy link
Contributor

@astenman astenman commented Nov 7, 2019

Change-Id: Ib13d86bc96a3702b0e0d79b27b7791898388e104

Since I am using this language server in emacs, it would be nice to have support for textDocument/documentHighlight.

The added functionality only looks for related items in the current file.

Change-Id: Ib13d86bc96a3702b0e0d79b27b7791898388e104
@msftclas
Copy link

msftclas commented Nov 7, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Thanks for sending it, what you have so far looks good. The other "sources" we have (completion, hover, references, etc), have tests written, so it'd be appreciated it you could add those to keep things tested.

Change-Id: I411c1d4daac84a6a12a95b11fa5781eaf42eeae9
@astenman
Copy link
Contributor Author

astenman commented Nov 8, 2019

Good point. I have added a test file with two simple tests.

Change-Id: I77908a16e6c230c14fb790a4f47a58e55303c273
Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

This is great. Just a few style comments. A preview of this in action:

image

Note how it picks the correct x. Previously, VS Code would just find any x and say "this is x".

Change-Id: If45beeafc9a40af5ac12b79d124c8021e9e492a9
@astenman
Copy link
Contributor Author

astenman commented Nov 13, 2019 via email

@jakebailey
Copy link
Member

Ah, I understand. This PR looks good to me, though I'm going to want to hold off on merging it immediately (extension release soon, so we're trying to keep things to bugfixes to limit risky changes).

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in reviewing and merging this. LGTM.

@jakebailey
Copy link
Member

Will merge once I have done a little bit of testing.

@jakebailey jakebailey merged commit 1a9d6e5 into microsoft:master Mar 18, 2020
@astenman
Copy link
Contributor Author

Thanks!

MikhailArkhipov pushed a commit that referenced this pull request Jun 15, 2020
* Initial support added for textDocument/documentHighlight

Change-Id: Ib13d86bc96a3702b0e0d79b27b7791898388e104

* Added two tests for DocumentHighlightSource

Change-Id: I411c1d4daac84a6a12a95b11fa5781eaf42eeae9

* Code refactoring according to comments from reviewer

Change-Id: If45beeafc9a40af5ac12b79d124c8021e9e492a9

Co-authored-by: Anders Stenman <[email protected]>
Co-authored-by: Jake Bailey <[email protected]>
(cherry picked from commit 1a9d6e5)
MikhailArkhipov pushed a commit that referenced this pull request Jun 15, 2020
* Initial support added for textDocument/documentHighlight

Change-Id: Ib13d86bc96a3702b0e0d79b27b7791898388e104

* Added two tests for DocumentHighlightSource

Change-Id: I411c1d4daac84a6a12a95b11fa5781eaf42eeae9

* Code refactoring according to comments from reviewer

Change-Id: If45beeafc9a40af5ac12b79d124c8021e9e492a9

Co-authored-by: Anders Stenman <[email protected]>
Co-authored-by: Jake Bailey <[email protected]>
(cherry picked from commit 1a9d6e5)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants