helix
                                
                                 helix copied to clipboard
                                
                                    helix copied to clipboard
                            
                            
                            
                        Show the context of the currently visible buffer contents à la context.vim
Describe your feature request
See context.vim for yourself. I think we may achieve this using tree sitter.

May be built-in or provided by a plugin.
This is a very useful feature to have, and it'd be nice if we could add it to core. For reference there's a treesitter port of context.vim which I use - https://github.com/romgrk/nvim-treesitter-context
This looks really cool! I don't think it belongs in core, but definitely as a plugin.
I thought it was amazing in Neovim briefly until I realized it was just a workaround for the bad practice of having modules that are too big. I soon uninstalled it, it is just not needed if you stick to best practices in the first place.
I would also say it is not needed in core along with @cessen . @the-mikedavis I saw on Matrix you were talking about putting it in core, maybe have a discussion in this issue?
Not sure what the decision will be but I wanted to play around with this a bit and got this so far: https://github.com/matoous/helix/commit/b74b298fbdbee61e6ccbb6445189b087e4738c3d. Personally, I don't see issue with this being part of the core, it's closely coupled to the tree-sitter capabilities helix already provides and it isn't a large effort to have this/maintain it.
The biggest issue I see so far is that it doesn't look great unless only specific tree sitter nodes are used for the context which would mean we would need configuration for the context for every language with tree sitter (or all ndoes could be taken by default and languages could have overrides). Example:

The nodes being source_file, impl_item, function_item, block. (don't mind the line numbers that are off)
@matoous Cool! I think you should open a PR with that so we can discuss in more details 🙂
@the-mikedavis also said something about that by the way: https://github.com/helix-editor/helix/issues/2740#issuecomment-1152513797
@CBenoit very rough PR: https://github.com/helix-editor/helix/pull/3944
Search term: sticky scroll for showing the current scope
ref: (in oldest first order)
Python:
MS VSCode: https://github.com/microsoft/vscode/issues/26757