flash.nvim icon indicating copy to clipboard operation
flash.nvim copied to clipboard

feature: Treesitter: expand selection

Open ralph-bergmann opened this issue 1 year ago • 1 comments

Did you check the docs?

  • [X] I have read all the flash.nvim docs

Is your feature request related to a problem? Please describe.

First, I like the plugin, but I can't use it as often as I wish.

My day-to-day job is developing Flutter apps (written in Dart). There, I have a lot of <Constructor>(). But the Treesitter mode (S) only selects the body of the constructor without the class name:

SCR-20240504-czmq

Is there a way to expand the selection to include the class name? See AnimatedBuilder or MaterialApp.

Describe the solution you'd like

In an ideal world, the plugin would automatically add the name of the constructor to the selection. But it would be enough to have a function to do this manually.

Describe alternatives you've considered

I've tried ; but it doesn't do what I'm looking for.

Additional context

No response

ralph-bergmann avatar May 04 '24 00:05 ralph-bergmann

I think I have found a way to achieve what I wanted.

  1. select code block with S
  2. jump to the start/end of the selection with O
  3. increase/decrease selection

ralph-bergmann avatar May 04 '24 01:05 ralph-bergmann

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

That's caused by the treesitter parse tree, so not possible to fix...

folke avatar Jul 07 '24 07:07 folke