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

Support nvim-treesitter-context

Open ggandor opened this issue 2 years ago • 1 comments

It would be great (and natural) to be able to jump to the folded "context" lines.

ggandor avatar Jul 10 '22 09:07 ggandor

I don't think it would be too hard to implement.

We could expose the required functions to retrieve the context window ID. From there, you can read the lines in the window yourself, and add highlights as required. And the last step will be to transform the (line, col) position in the context window into a (line, col) on the underlying buffer. A bit tricky because multi-line nodes (e.g. C function definitions that span many lines) are folded into a single line, but still doable.

romgrk avatar Jul 10 '22 11:07 romgrk