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

Command: Generate CodeLenses using Tree-Sitter query #3861

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

abeatrix
Copy link
Contributor

Refactor code lens generation for Cody Commands.

Updated to use tree-sitter for documentable nodes to display code lenses more accurately, instead of counting on folding ranges. This helps with the issues where code lenses are showing up in non-documentable nodes

Test plan

Enable Code Lenses in Cody to check if the lenses are showing up.

Before

Code Lenses are showing up randomly due to folding ranges positions in large functions or classes:

image

After

Code Lenses will not show up in non-top-level-documentable nodes:

image

Known limitation: documentable nodes do not work with arrow functions

@abeatrix abeatrix requested review from umpox and a team April 18, 2024 17:03
@abeatrix abeatrix marked this pull request as draft April 22, 2024 18:48
@abeatrix abeatrix removed request for a team and umpox April 22, 2024 18:48
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

Successfully merging this pull request may close these issues.

None yet

1 participant