folke / flash.nvim

Navigate your code with search labels, enhanced character motions and Treesitter integration
Apache License 2.0
2.47k stars 33 forks source link

feat(treesitter): include parent tree in addition to injected tree for Treesitter node selections #275

Closed atusy closed 2 months ago

atusy commented 10 months ago

I often have a situation where I want treesitter node selections to select outside the injections.

Here's a screenshot from :lua require("flash").treesitter({ highlight = { backdrop = true } }) in a markdown code block.

image

Note that the similar features are available in https://github.com/ggandor/leap-ast.nvim and https://github.com/mfussenegger/nvim-treehopper .

github-actions[bot] commented 2 months ago

This PR is stale because it has been open 60 days with no activity.

folke commented 2 months ago

Implemented a proper fix for this. ty!