Files
nvim-docs-view/demo.gif
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

289 KiB
2065x1080px

/tiyn/nvim-docs-view/raw/commit/6249b6d5f89a286cc9c2ef1d9183ae5335f4c552/demo.gif