Neovim on macOS with LazyVim: A Pro Setup in One Afternoon

How we swapped the Mac's stock Vim for Neovim with LazyVim — language servers, fuzzy finding, Treesitter and git, all installed ahead of time so the very first launch is ready to work.

  • Neovim v0.12.6
  • LazyVim starter
  • 38 plugins
  • 15 tools
  • 32 parsers

Why bother?

macOS ships Vim at /usr/bin/vim. It's part of the system and protected by System Integrity Protection, so you can't delete it — and a macOS update would put it back anyway. The practical move is to stop reaching for it: install Neovim from Homebrew and add a few lines to ~/.zshrc so muscle memory lands in the right place.

# ~/.zshrc
alias vi='nvim'
alias vim='nvim'
export EDITOR='nvim'

On its own, Neovim is a plain editor with a very good engine underneath: a built-in LSP client, Treesitter, and Lua for configuration. What makes it feel like a professional's editor is the layer on top — and that's where LazyVim comes in.

What sits on top of Neovim

LazyVim is a distribution: a curated, maintained set of plugins with sensible defaults that you override in your own files. Many long-time Vim users now start here instead of hand-writing a thousand-line config.

PieceWhat it does
lazy.nvimThe plugin manager. Installs, updates and lazy-loads plugins; its window opens with Space l.
LazyVimThe distribution: theme, status line, buffer line, dashboard, keymaps and the plugins below, wired together.
ExtrasLanguage packs enabled in lazyvim.json: Python, TypeScript, JSON, Markdown, YAML, TOML, Docker.
MasonInstalls language servers, linters and formatters into Neovim's own folder — never system-wide.
TreesitterReal parsers for highlighting, indenting and text objects. 32 languages compiled.
vim.lspNeovim's built-in LSP client, talking to the servers Mason installed.

The install, step by step

Everything below ran once. The goal: a first launch with nothing left to download.

  1. Install the tools LazyVim leans on. ripgrep for searching, fd for finding files, lazygit for git, and the tree-sitter CLI for compiling parsers. rg, fzf, Node and a Nerd Font (JetBrains Mono) were already on this Mac.

    brew upgrade neovim
    brew install fd lazygit tree-sitter-cli
  2. Clone the starter config. Then drop its git history, so the config is yours to commit wherever you like.

    git clone --depth 1 https://github.com/LazyVim/starter ~/.config/nvim
    rm -rf ~/.config/nvim/.git
  3. Pick your languages. Extras are listed in ~/.config/nvim/lazyvim.json. You can also toggle them later from :LazyExtras.

    {
      "extras": [
        "lazyvim.plugins.extras.lang.python",
        "lazyvim.plugins.extras.lang.typescript",
        "lazyvim.plugins.extras.lang.json",
        "lazyvim.plugins.extras.lang.markdown",
        "lazyvim.plugins.extras.lang.yaml",
        "lazyvim.plugins.extras.lang.toml",
        "lazyvim.plugins.extras.lang.docker"
      ]
    }
  4. Install the plugins headlessly. This pulls all 38 plugins without opening a window.

    nvim --headless "+Lazy! sync" +qa
  5. Install the language tools. A plain MasonInstall failed here with E492: Not an editor command — Mason is lazy-loaded, so its commands don't exist yet when Neovim starts headless. Loading it first fixes that.

    nvim --headless -c "Lazy! load mason.nvim" \
      -c "MasonInstall lua-language-server pyright ruff vtsls json-lsp marksman \
          markdownlint-cli2 markdown-toc yaml-language-server taplo \
          dockerfile-language-server docker-compose-language-service hadolint" -c qall
  6. Compile the parsers. Otherwise they build during your first launch while you wait.

    nvim --headless -c "Lazy! load nvim-treesitter" \
      -c "lua require('nvim-treesitter').install({'python','lua','typescript','tsx', ...}):wait(600000)" -c qa
  7. Check its health. :checkhealth lazyvim came back clean: Neovim ≥ 0.11.2, git, rg, fd, lazygit, fzf, curl, a C compiler and the tree-sitter CLI all found.

    nvim "+checkhealth lazyvim"

What's installed

The 15 tools in Mason

  • pyright
  • ruff
  • vtsls
  • lua-language-server
  • stylua
  • shfmt
  • json-lsp
  • yaml-language-server
  • taplo
  • marksman
  • markdownlint-cli2
  • markdown-toc
  • dockerfile-language-server
  • docker-compose-language-service
  • hadolint

They live in ~/.local/share/nvim/mason/, each in its own folder. Nothing lands in /usr/local or your global npm. Press Space c m to update or add more.

Where the config lives

~/.config/nvim/
├── init.lua               -- loads lua/config/lazy.lua
├── lazyvim.json           -- the extras you turned on
└── lua/
    ├── config/
    │   ├── options.lua    -- vim.opt settings
    │   ├── keymaps.lua    -- your own mappings
    │   ├── autocmds.lua
    │   └── lazy.lua       -- plugin manager bootstrap
    └── plugins/           -- one file per plugin you add or override

The keys worth learning first

Space is the leader key. Press it and wait a moment: which-key shows everything that follows, so you won't need a cheat sheet for long.

KeysWhat it does
Space SpaceFind a file by name
Space /Search text across the project (ripgrep)
Space eToggle the file tree
Space ,Switch between open buffers
g d · g r · KGo to definition · references · show docs
Space c aCode action (quick fix)
Space c rRename a symbol everywhere
Space x xAll diagnostics in a list
Space g glazygit, full screen
Space l · Space c mPlugins · language tools

Things that tripped us up

Icons need a Nerd Font LazyVim's file icons, git symbols and status-line glyphs are Nerd Font characters. With a terminal font like SF Mono they show up as empty boxes. You don't need to switch fonts: list a Nerd Font after your usual one (e.g. "SF Mono", Menlo, "JetBrainsMono Nerd Font Mono", monospace) and the terminal falls back to it for the icons only.
checkhealth looks scarier headless Run without a window, several plugins report "setup did not run", and image previews complain about kitty, ImageMagick, Ghostscript and LaTeX. Those are optional. The section that matters is lazyvim, and it was all green.
The system Vim stays An alias only changes what your shell runs. Scripts that call /usr/bin/vim by path still get the stock one — and that's fine.

Where to go next

  • Open :LazyExtras to add more languages (Go, Rust, Tailwind…) or editor extras.
  • Put personal settings in lua/config/options.lua rather than editing plugins.
  • Each file in lua/plugins/ returns a spec that LazyVim merges with its own, so overriding a plugin is usually three lines.
  • When something feels slow, :Lazy profile shows exactly which plugin is to blame.

Written after setting this up on a MacBook Air with Homebrew. Versions as installed: Neovim 0.12.6, LazyVim starter, tree-sitter CLI 0.27.1, lazygit 0.66.2, fd 10.5.0.

Comments

Popular posts from this blog

How To Create Phpinfo to List What PHP Configuration Have

Coding On Your Android Phone Using Termux

How to Install Microsoft Office on Your PC: A Step-by-Step Guide