You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using this plugin, it occurred to me that it's actually rather counter intuitive that the context can appear and disappear depending on the cursor location.
Imagine the first two lines below are context.
func A() { // first virtual line of context
if x { // second virtual line of context
// there's more code in the `if x` block above not shown in the window
// this is the end of the `if x` block
}
if y {
// more code
}
}
It doesn't really matter to me where the cursor is when I'm reading this code, I just want to see that the code at the top of the window belongs to the if x block, which belongs to func A block. The context I'm looking for is only a function of what is and isn't visible on the screen.
As is, if I move my cursor to the if y block, the if x context would disappear.
Could we add an option to just use the topmost visible line of the buffer instead of the cursor position?
The text was updated successfully, but these errors were encountered:
Choices:
- 'cursor' (default): current behaviour, context is determined by
cursor position
- 'topline': context is determined by the top of the window
Resolves#77
Choices:
- 'cursor' (default): current behaviour, context is determined by
cursor position
- 'topline': context is determined by the top of the window
Resolvesnvim-treesitter#77
Choices:
- 'cursor' (default): current behaviour, context is determined by
cursor position
- 'topline': context is determined by the top of the window
Resolves#77
While using this plugin, it occurred to me that it's actually rather counter intuitive that the context can appear and disappear depending on the cursor location.
Imagine the first two lines below are context.
It doesn't really matter to me where the cursor is when I'm reading this code, I just want to see that the code at the top of the window belongs to the
if x
block, which belongs tofunc A
block. The context I'm looking for is only a function of what is and isn't visible on the screen.As is, if I move my cursor to the
if y
block, theif x
context would disappear.Could we add an option to just use the topmost visible line of the buffer instead of the cursor position?
The text was updated successfully, but these errors were encountered: