hkupty / impromptu.nvim

Create prompts fast and easy
MIT License
39 stars 1 forks source link

Menu layout #20

Closed KillTheMule closed 5 years ago

KillTheMule commented 5 years ago

I got

  [r] Auxiliaries  [n] Constraint   [t] Contact      [l] Control      [e] Element      [d] Load       
  [M] MMC          [q] Close this prompt
  [f] Safety     

with the shown description and the correct number of columns.

  1. As you can see, it hast this triangular shape. I can imagine where it's coming from (after all, I did set the column number to 6 here), but it doesn't look properly. It should only show 2 rows here I'd say (with the q entry being the last column in the last row).
  2. As you can see, the quit option isn't aligned. This is because it is not contained in the opts dict that is passed to the column function, evading the computation of column width in my function. I can of course adjust for this, but maybe it makes sense to add this item the the opts dict?
  3. Can you pass the window height to the columns function? It would be important to know for proper column layout. On the other hand, we can get this info from the neovim API, so you might scrap passing this altogether.
  4. Note that there are only 9 menu entries, where I'm passing 13 (so it should be 14 with the q item). The code exhibiting this is here, to try it out directly see the instructions at https://github.com/Vigemus/impromptu.nvim/issues/14