You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edits and Chats currently expand a cursor position to the nearest folding range. This is ok, but it isn’t ideal, there are many cases where this fails for us. For example, an “it” block inside a “describe” block in a JS test is not seen as a folding range, so we always expand the selection to the full “describe” block.
Ideally we can always expand to the nearest enclosing function if available, before falling back to the folding range logic.
How:
Add a tree-sitter query to find the nearest enclosing function
Update our Smart Selection logic to look for this first.
This should automatically add this behaviour to chat and edit.
The text was updated successfully, but these errors were encountered:
umpox
changed the title
Add getEnclosingFunction logic for range expansion in edits (and possibly other commands)
Add getEnclosingFunction logic for range expansion in edits + chats (and possibly other commands)
Mar 21, 2024
Adding an issues that I hope this might address. Where the user cursor is within a massive class, we throw an error saying "selected text is too long", would be nice to gracefully handle that.
What:
How:
The text was updated successfully, but these errors were encountered: