What I’ve Learned About neovim

Here are some of the things I’ve learned about Neovim:

I need to keep my Neovim configuration separate from Vim. I tried to use a conditional in my .vimrc to load a differen config for Neovim, but this wasn’t good practice.

To keep my config in a dotfile, I do

ln -sf ~/.files/nvim ~/.config/nvim

I use lazy.nvim to manage my plugins. I like trying out new plugin managers. I keep my old Vim on Vim-Plug.

Where I don’t need to do much configuration, I keep them in plugins.lua. For plugins that require more configuration, I create a file in the plugins directory.

I use Lua as much as possible. Where I can’t, I create a prelim.vim file that I source in my init.lua.

I source it like so:

vim.cmd [[runtime! prelim.vim]]

The prelim.vim is mainly autocommands.