jbyuki / venn.nvim

Draw ASCII diagrams in Neovim
MIT License
967 stars 21 forks source link

Clarify proper usage with `cmdheight=0` #28

Open prescientmoon opened 9 months ago

prescientmoon commented 9 months ago

It looks like the hydra suggested keybinds print :VBox to the cmd line even when silent = true, which make the statusline flicker when cmdheight=0. I cannot figure out how to use :silent with a visual mode command, so it would be nice if the readme suggested a way to fix issues like these. It would be nice if there was a documented way to call VBox directly from lua, for example, without going through the cmdline mechanism.

jbyuki commented 9 months ago

This is more related to how hydra handles keybindings. Although I know that the maintenainer is currently not very active so it would be hard to get answers there. How about setting the keybinding manually?

vim.keymap.set('v', '<leader>g', ':VBox<cr>', {silent = true})

or using vimscript

vnoremap <silent> <leader>g :VBox<CR>

Also make sure to have the latest nightly version for these features as they are in active development.

prescientmoon commented 9 months ago

@jbyuki You are right, setting the keymap using vim.keymap.set does not make the cmdline flicker, although I would expect setting silent = true to have the same effect in hydra (it does not).

jbyuki commented 9 months ago

I've seen a new hydra.nvim fork scrolling in my feed: https://github.com/nvimtools/hydra.nvim . Maybe they could help you there on that subject as I don't use hydra myself.

prescientmoon commented 9 months ago

Never mind, the issue still occurs with the vim keybind: neovim-statusline-flicker

(I hope the gif loads properly)

@jbyuki

jbyuki commented 9 months ago

Related to the status line plugin? It doesn't flicker for me.

On Wed, Dec 27, 2023, 6:18 PM Adriel @.***> wrote:

Never mind, the issue still occurs with the vim keybind: neovim-statusline-flicker.gif (view on web) https://github.com/jbyuki/venn.nvim/assets/39400800/41743995-09f3-4803-abdf-aa833f5f69e6

@jbyuki https://github.com/jbyuki

— Reply to this email directly, view it on GitHub https://github.com/jbyuki/venn.nvim/issues/28#issuecomment-1870488833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJBOFPG6BFH27DQU2RPS7TYLRJ4DAVCNFSM6AAAAABA5GBGRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGQ4DQOBTGM . You are receiving this because you were mentioned.Message ID: <jbyuki/venn .@.***>