context.vim icon indicating copy to clipboard operation
context.vim copied to clipboard

Support getting context of topmost line (regardless of cursor position)

Open samueloph opened this issue 3 years ago • 2 comments

I've created this issue after the following comment: https://github.com/wellle/context.vim/issues/53#issuecomment-1267599583

I'd like to only see the context of the topmost line[0], something like this (vscode's sticky scroll): https://www.youtube.com/watch?v=iM4Vhrk4irY

Thank you for working on this plugin!

[0] I do understand that some people will consider it noisy in some situations (just like the bugreporter on #53 described), but the benefit here is that I can see the context of everything in the screen without having to jump between lines. I think there's a value in having this behavior available as a configuration setting.

samueloph avatar Oct 09 '22 11:10 samueloph

I am now using https://github.com/nvim-treesitter/nvim-treesitter-context to achieve this, I just need to set mode = 'topline'. It works based on treesitter and so it has a precise parsing of the file's contents to define what goes in the context.

samueloph avatar Jul 28 '23 19:07 samueloph