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

[feature suggestions] TreeSitter text object for blocks, delimiter highlighting

Open GasparVardanyan opened this issue 3 months ago • 6 comments

Like this plugin please can you implement a treesitter textobject for blocks (by the #%% delimiter) so it'll be possible to jump over next/prev blocks?

Also the block delimiter highlight would be useful too.

I would like to have the block delimiter line fully highlighted, but so far I've got only the text highlight, not the whole line (like cursorline) Image

GasparVardanyan avatar Oct 01 '25 14:10 GasparVardanyan

Maybe this opens possibility to run multiple blocks once? I think so.

GasparVardanyan avatar Oct 01 '25 16:10 GasparVardanyan

Couldn't you just hover over % and then do *% or #%?

nickeisenberg avatar Oct 01 '25 23:10 nickeisenberg

I can, and what?

GasparVardanyan avatar Oct 02 '25 16:10 GasparVardanyan

Couldn't you just copy-paste your code to jupiter notebook and run it? Why are you here? :d

GasparVardanyan avatar Oct 02 '25 16:10 GasparVardanyan

oh... I think I see what you mean. You want to be able to, from wherever your cursor is, so something like nB to jump to the next blocl?

nickeisenberg avatar Oct 07 '25 20:10 nickeisenberg

You're maybe looking for NotebookNavigator.nvim. It has textobjects for blocks (though not implemented via treesitter): https://github.com/GCBallesteros/NotebookNavigator.nvim?tab=readme-ov-file#miniai-integration

(EDIT: and also highlighting: https://github.com/GCBallesteros/NotebookNavigator.nvim?tab=readme-ov-file#enabling-minihipatterns-cell-highlighting )

tmke8 avatar Oct 08 '25 11:10 tmke8