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

feat: allow pos="center", row=0, line=0 #227

Merged
merged 8 commits into from
Sep 19, 2021

Conversation

l-kershaw
Copy link
Collaborator

Heavily based on the implementation from this PR by @jesseleite.

Also, added options to center in only one direction using 0 for row/line.
This required shifting the indices of everything else by one, which is a bit annoying, but this is how the implementation in vim works, so 🤷
This does break stuff in telescope, so I will write a PR over there when I get a chance.

@l-kershaw
Copy link
Collaborator Author

As mentioned here, the tests are currently broken as there is no longer a "nightly" tagged neovim release

Copy link
Collaborator

@Conni2461 Conni2461 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if you are done we can update the notice date and merge this + the telescope PR

@Conni2461
Copy link
Collaborator

@l-kershaw
Copy link
Collaborator Author

@Conni2461 thanks, I was getting very confused 😅
It's weird as its complaining about stuff that isn't even present in this PR

@l-kershaw l-kershaw merged commit edb76cc into nvim-lua:master Sep 19, 2021
@l-kershaw l-kershaw deleted the feat/popup_center branch September 19, 2021 16:23
@jesseleite
Copy link

@l-kershaw Oh rad, so this does the same thing as in my PR here nvim-lua/popup.nvim#9!?

@l-kershaw
Copy link
Collaborator Author

@jesseleite yeh, thanks for writing that PR!
This was heavily based on your version, I just refactored it slightly so that we could also use the centering just horizontally or just vertically, using col=0 or row=0 respectively (as is done in vim).

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

Successfully merging this pull request may close these issues.

3 participants