Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
samueloph opened this issue Oct 9, 2022 · 2 comments
Open

Comments

@samueloph
Copy link

I've created this issue after the following comment:
#53 (comment)

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
Copy link
Author

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.

@baco
Copy link

baco commented Aug 16, 2024

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.

Exactly, that's setting missing here. I think it's still necessary to have it here because nvim-treesitter-context doesn't work on Classic Vim, as context.vim does; it's Neovim only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants