feat: add cursor layout#878
Conversation
…nto feat/add-cursor-layout
…nto feat/add-cursor-layout
…nto feat/add-cursor-layout
…nto feat/add-cursor-layout
skip-checks: true
|
Nice job! Are you calculating the corner the window should be anchored to? Like in floating windows either one of the corners ( Also, I think the layout updates should be put on hold for now until #823 is finalized and merged. |
I am calculating the position so that the cursor is above the NW corner. Maybe it would be better for the window to always anchor to the NW, NE and SE points?
I remember looking into it, but it was so long ago that I'll look into it again.
Of course, I didn't see this was ongoing. |
…nvim into feat/add-cursor-layout
skip-checks: true
It ended up being a lot easier than I expected. Everything is working as it did before now. |
l-kershaw
left a comment
There was a problem hiding this comment.
One small nitpick/question regarding preview_width, but overall looks very good 🙂
skip-checks: true
l-kershaw
left a comment
There was a problem hiding this comment.
I think I'm happy with this now 👍
I'll run this PR for a little bit and if I don't find any problems I'll merge this later today/tomorrow.
|
This looks awesome. How do I tell |
|
@gegoune Thanks! |
Closes #496.
Here's how it looks like when space is not an issue, my cursor is on the first "t" of the "test" variable name:

Here's how it looks like when space is restricted in the bottom right (cursor at the same place):

What happens when there is not enough room is that the floating window gets put above the cursor line and gets fixed to the right (with 1 extra space to give it some room).