Skip to content

Suggestion: Code Explorer AST view should filter nodes matching the ESQuery selector #473

Description

@DMartens

What problem do you want to solve?

Currently the ESQuery selector above the editor highlights the text of the matching nodes but the matched nodes may be hard to find in the AST view.

What do you think is the correct solution?

I think the ESQuery selector should also be used to filter the AST view only showing matching nodes similar to the typescript-eslint playground.
This could be done either automatically in the "Tree" view if the selector is set or by an additional AST view (current AST views are "Tree" and "JSON").

Participation

  • I am willing to submit a pull request for this change.

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

The idea came from testing the markdown parser with selector :not([position]) to find nodes without location information. The problem is they cannot be highlighted because of the missing location information. This means even if #64 (going to node by clicking on the respective code) is resolved, it would not help in this situation.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Needs Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions