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

Feature request: Highlight the matching ranges in the text editor when mousing over elements in the Untyped AST View #165

Open
baronfel opened this issue Jan 8, 2021 · 2 comments

Comments

@baronfel
Copy link

baronfel commented Jan 8, 2021

It would be amazing for verification/usability if hovering over an element in the AST view also highlighted the matching text range in the text editor on the left pane. For example, in this screenshot:

image

The New UAST node has a range of (2,4--9,36), so the text from new ... to the end of the constructor should be highlighted when I have hovered over or selected the New UAST node.

@nojaf
Copy link
Collaborator

nojaf commented Jan 9, 2021

We used to have such a thing in the other AST views, where you could click an item and highlight it in the text.
The proposal you made could work in a similar fashion, however, I'm not sure how to implement it exactly.
Getting to the correct range (if present) at any given cursor position seems challenging.
Any ideas on how to approach this?

@nojaf
Copy link
Collaborator

nojaf commented May 23, 2023

This works now when you click on the range text itself. (For example (1,0--1,7)).
Close enough?

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

No branches or pull requests

2 participants