Neovim on Apple silicon: a config that survives macOS updates
Most broken Neovim setups after a macOS update are really broken toolchains: a language server built against an old SDK, or a treesitter parser compiled for the wrong architecture.
Let Homebrew own the binaries
Install language servers and formatters with brew instead of a plugin-managed installer. Homebrew rebuilds them when the SDK changes.
Lock your plugins
lazy.nvim writes a lockfile. Commit it, and update deliberately with :Lazy update when you have time to read the changelogs.
Rebuild parsers
After Xcode command line tools update, run :TSUpdate once. Stale parsers are the most common cause of sudden highlight errors.
- Commit lazy-lock.json.
- Install LSPs with brew.
- Run :checkhealth after every macOS update.
init.lua
vim.opt.number = true
vim.opt.relativenumber = true
require('lazy').setup('plugins', {
change_detection = { notify = false },
checker = { enabled = false },
})
Talk is cheap. Show me the code.
Linus Torvalds, linux-kernel mailing list (2000)
Keep
checker.enabled off so plugin updates happen when you choose, not when you open a file.
$ cat /comments 6
Great post. One small correction: the flag is case-sensitive on older versions.
Try clearing the cache first, that fixed it for me.
Followed along step by step and it worked first time, which never happens.
Does this survive a macOS point release? Mine broke after the last one.
It does, I tested it on the latest release yesterday.
The benchmark table alone is worth the read.