Improving my NVIM setup
I’m a VIM user and I have a long setup file for my custom mappings and plugins, so today I was revisiting all my plugins to remove the unused and to update to the latest versions.
One of the plugins I use the most is nvim-coc wich acording with the description is a:
Intellisense engine for Vim8 & Neovim, full language server protocol support as VSCode
But for me is much more that that, this plugin includes some interesting extencions like the git integration, the explorer and more.
I didn’t know about the coc-explorer and I was using NERDTree wich is very cool but the coc-explorer
adds new features for neovim and is more powerfull and easy to use.
To install this extension, you need to have nvim-coc and then run:
:CocInstall coc-explorer
After that you probably shoud set your settings for the explorer, my setup is mostly this:
{
...
"explorer.width": 30,
"explorer.icon.enableNerdfont": true,
"explorer.previewAction.onHover": false,
...
}
Also is usefull to have this key mappings:
nmap <space>e :CocCommand explorer<CR>
nmap <space>f :CocCommand explorer --preset floating<CR>
" Close nvim when coc-explorer is the last window
autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif
I use a patched version of FiraCode with the nerd glyphs.
To install this font you need to run
# On MacOS
brew tap homebrew/cask-fonts
brew cask install font-firacode-nerd-font