Open effinsky opened 1 year ago
It might be possible but only in the few languages that have nodes for words within strings.
P.S. This should probably go to nvim-treesitter-textobjects.
thanks, and thanks for the tip.
Nvim-treesitter does not have an incremental selection feature yet. Also, it can only select tree-sitter defined objects.
When you look at the source code of incremental selection it is roughly
Isn't it possible to use regular b
, w
motion to extend a selection world-wise? Nvim-treesitter-textobjects would allow to do also certain tree-sitter motions
Is your feature request related to a problem? Please describe.
Incremental selection on nvim-ts is a useful feature, and is logically bound to ts-defined objects. I wonder if we could add more objects to it, so that, it'd not treat a string, for instance, as a single object, but select more gradually within the string, say inside a word ('iw'), for instance, then around word ('aw'), and then the entire string.