neovim
🌱 This post is in the growth phase. It may still be useful as it grows up.
I’ve avoided a heavily customized experience for most of my life. This is doubly true with Vim.
For me, Vim is a passport. I can take text-editing powers to any tool with decent Vim emulation. And I do. I love using today’s cloud coding environments and Vim-capable second-brain tools (like Obsidian).
But, with VSCode, I can utilize neovim via the neovim-vscode extension.
I’ve tried this extension before. But I didn’t want to dive into configuration before I had a way to share it between machines. And now I do.
Here are some things I’ve learned so far.
Install neovim
Lua
neovim supports both lua and VimScript. VimScript is a trash fire burning a fresh hole in the atmosphere. So, I’m opting for Lua — another language I don’t know.
~/.config/nvim/init.lua
[init.lua][]
is a file that executes before neovim starts, when placed in the ~/.config/nvim/
path.
neovim-vscode integration
There’s a condition that can be used to load extensions only in VS Code (or neovim).
lazy.nvim
neovim includes a package management system based on the filesystem.
Download packages into privileged folders and they will autoload.
For that reason, you don’t need a dedicated package manager.
However, I’m operating across several systems. And I’d like my dotfiles not to balloon with plugin source code. So, I’m using lazy.nvim.
To set it up, add all this to init.lua
and run nvim
in the terminal.
This conditionally clones lazy if it doesn’t exist and adds it to the runtime path.
You can utilize it with a setup
call.
plugin: nvim-surround
nvim-surround is my one non-negotiable plugin.
Here’s how it’s set up in neovim.
Add kylechui/nvim-surround
to the lazy setup()
package table.
This setup is a skeleton that leaves you with some config options.