flash.nvim
flash.nvim copied to clipboard
feature: More treesitter selection options
Did you check the docs?
- [X] I have read all the flash.nvim docs
Is your feature request related to a problem? Please describe.
Would it be possible to customize ;
and ,
keys for treesitter selection?
Would it be possible to prevent wrapping when increasing/decreasing selection?
Describe the solution you'd like
A possibility to specify keys e.g. in opts.modes.treesitter.keys
.
Setting opts.modes.treesitter.search.wrap
to false
would prevent wrapping
Describe alternatives you've considered
Additional context
Thank you very much for the great plugin!
Would it be possible to customize
;
and,
keys for treesitter selection?
+1 for this. It seems that ;
and ,
are hard-coded: https://github.com/folke/flash.nvim/blob/48817af25f51c0590653bbc290866e4890fe1cbe/lua/flash/plugins/treesitter.lua#L130-L141 I think it would be natural enough to have a configuration option similar to char_actions
: https://github.com/folke/flash.nvim/blob/48817af25f51c0590653bbc290866e4890fe1cbe/lua/flash/config.lua#L194-L205 https://github.com/folke/flash.nvim/blob/48817af25f51c0590653bbc290866e4890fe1cbe/lua/flash/plugins/char.lua#L197-L205
Would it be possible to prevent wrapping when increasing/decreasing selection?
+1 on this as well, but I'm having a harder time tracing down which part of the code is responsible for wrapping the node search. 😅 It doesn't seem to be as simple as adding a wrap = false
config to places like https://github.com/folke/flash.nvim/blob/48817af25f51c0590653bbc290866e4890fe1cbe/lua/flash/plugins/treesitter.lua#L112 or https://github.com/folke/flash.nvim/blob/48817af25f51c0590653bbc290866e4890fe1cbe/lua/flash/plugins/treesitter.lua#L131-L133 Seems like there might be more logic controlling for it somewhere—maybe get_nodes
? Anyway, I assume it's possible, lol.
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.
please keep
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.
please keep
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.
please keep
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.
please keep