feat: implement nvimpager = "float" - #608
Conversation
|
Thank you! It works! Some ideas (waiting for comments):
|
|
good ideas, i'll try to implement these changes later today and see what looks good |
|
i have implemented the changes:
one shortcoming (or feature?) compared to the last version is that the example/help window does not get directly overlaid on top of the preview help/example window, but is relative to it. subsequent help->help/example->example windows are overlaid as before. |
|
Thank you, @kkanden! Some observations:
|
so in the
that happens if the editor window is less than 60 and the width of the floating window defaults to 80 columns. this also makes the window look like it's stuck to the side of the editor instead of centered. i thought this looked better than a centered but small and squished window. |
|
I'm sorry, but I'm on a trip now and will need some time to properly review the code again... |
- Avoid code repetition. - Center the float window on the editor window. - Don't set style and border (it's up to the user to set the value of 'winborder'). - Update the documentation of the "float" value of `nvimpager`.
- Avoid code repetition. - Center the float window on the editor window. - Don't set style and border (it's up to the user to set the value of 'winborder'). - Update the documentation of the "float" value of `nvimpager`.
…nto nvimpager_float
|
The pull request is ready for review again (although the "format-suggest/yaml" check is failing). |
|
I totally messed up the git history of the pull request when rebasing the branch on the main branch. The only way that I know to fix it is to create a new branch and make a new pull request, but this would erase @kkanden from the git history. What should we do? Merge the branch as is (and fix the merge description while merging)? Or could @kkanden make a new pull request from a new branch, overwriting some files with the files from this branch? |
if it's okay with you, i don't have a problem with not appearing in the git history. if not, what would need to be done on the new branch to get the pr in good state? |
|
Thankyou! I'll try to merge this pull request. I think it will work. We can fix any bugs later... |
this implements the "float" option for nvimpager for both R help and example. i have added a utils function for creating floating.
in the future, a user config option could be added to customize the location and size of the floating window. by default it just centers the window.