justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.19k stars 64 forks source link

Bindings are not silent on neovim #236

Closed pianocomposer321 closed 1 year ago

pianocomposer321 commented 1 year ago

All the bindings in the ftplugin/ directory check for a specific vim patch and if it exists they use a <CMD> mapping. This check does not pass for neovim however, even for versions that have <CMD> mappings. The result is that the mappings are not silent. This is particularly annoying for me because I'm using https://github.com/folke/noice.nvim, so I get a flash of a popup window every time I do an action in dirvish, because the mappings are not executed silently.

I would just submit a PR, but I'm not sure what the equivalent to has('patch-8.2.1978') is for neovim 🤷.

justinmk commented 1 year ago

thanks for noticing this!

but I'm not sure what the equivalent to has('patch-8.2.1978') is for neovim

:help has() mentions has('nvim-x.y.z') . Nvim will declare "vim 8.2" , but it makes sense to check for nvim version specifically.

justinmk commented 1 year ago

bindings in the ftplugin/ directory check for a specific vim patch and if it exists they use a <CMD> mapping. This check does not pass for neovim however,

fixed in https://github.com/justinmk/vim-dirvish/commit/c9cf284637d8c777597646c6fad338bdc35ac54f