Commit Graph

17 Commits

Author SHA1 Message Date
jmp
ea36462bb8 feat, refactor: add "bottom" position opt, update to Lua API command creation (#2)
* refactor: use Lua API for user command

    • remove "plugin" dir
    • make toggle() local

* feat: add "bottom" as valid "position" opt

    If "bottom" is given as "position" configuration value, open
    the docs window at the bottom of the window. Adding the "height"
    option complicates setting the window dimensions, e.g. if we are
    opening a split on the sides but also change the height of the
    window, it will resize "prev_win" as well. As a consequence, we
    want to "reset" the width or height vals back to the current win
    dimension depending on the position we choose.

    Associated refactors:
        • add default "height" value in default configuration
        • rename user and default configuration tables for clarity
        • programatically set default configuration table

* refactor: cleanup after change request

    • use tbl_extend() to produce a new configuration table from
      the default cfg and user cfg

    • choose local variables over updating the default cfg when
      updating height and width inside of toggle() based on the
      chosen window position

    • move the default cfg table inside of setup()

* Update README.md

Add GIF displaying functionality

* include demo.gif in the repo
2022-06-21 03:46:43 +02:00
amrbashir
9c186ab938 chore: add demo 2022-06-05 10:29:12 +02:00
amrbashir
8a6782d8a9 chore: update license 2022-06-03 21:12:20 +02:00
amrbashir
64a4756f5b fix: don't force close the docs view window 2022-05-29 14:52:20 +02:00
amrbashir
7150b700c2 ci: add formatting check ci 2022-05-15 14:37:47 +02:00
amrbashir
2321d1f1f7 chore: formatting 2022-05-15 10:55:24 +02:00
amrbashir
66cb6a423f fix: disable autocmd when buf is closed 2022-05-15 10:28:13 +02:00
amrbashir
4d491dc47f feat: unlist docs view buffer from buffer list 2022-05-15 04:45:27 +02:00
amrbashir
e30462dff6 feat: toggle docs view instead of just showing it 2022-05-14 13:53:41 +02:00
amrbashir
bd033385d2 fix: override defaults only if explicitly defined in user config 2022-05-13 21:47:34 +02:00
amrbashir
f5768fa866 feat: add setup function 2022-05-13 21:00:25 +02:00
amrbashir
f49bcc50f0 refactor: change open function to show 2022-05-13 18:44:08 +02:00
amrbashir
c0abec2b1b chore: rename files 2022-05-13 18:02:21 +02:00
amrbashir
763ea41355 chore: remove unused function 2022-05-13 17:55:24 +02:00
amrbashir
1ef4881e5c chore: update README.md 2022-05-13 17:53:14 +02:00
Amr Bashir
fa1daa746d chore: add license 2022-05-13 17:50:09 +02:00
amrbashir
71b231bb24 init 2022-05-13 17:38:49 +02:00