fantomas-tools icon indicating copy to clipboard operation
fantomas-tools copied to clipboard

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

Open baronfel opened this issue 5 years ago • 2 comments

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.

baronfel avatar Jan 08 '21 15:01 baronfel

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 avatar Jan 09 '21 09:01 nojaf

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

nojaf avatar May 23 '23 06:05 nojaf