Skip to content
Discussion options

You must be logged in to vote

Thanks for kind words!

Yes, this should be possible, but to what actual extent depends on the effort.

I think the most promising way of doing that would be to use textobjects based on tree-sitter, which requires creating own captures in 'after/queries//textobjects.scm' and use them later in gen_spec.treesitter().

A slightly more straightforward way would be to use Lua patterns and construct a custom textobject according to specification.

Even more straightforward (yet limited) approach would be to reuse gen_spec.argument() with "||" and "&&" as separators. The problem is that they both can't be used inside single custom textobject (Lua patterns don't allow alteration of strings, only char…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Praczet
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.ai
2 participants