我的neovim的配置是基于lazy.vim

1. 安装lazyvim

下面给出一份 2025 年最新、在 Windows / macOS / Linux 上都能复现的「零失败」安装流程。
只要依次复制命令,2-3 分钟即可进入开箱即用的 LazyVim。


  1. 前置检查(必须)

1.1 Neovim ≥ 0.9

nvim --version # 若 < 0.9 去 GitHub Release 下 AppImage 或安装包

1.2 依赖工具

Ubuntu / Debian

sudo apt install git curl ripgrep fd-find unzip build-essential -y

macOS (Homebrew)

brew install neovim git ripgrep fd unzip

Windows (Scoop 为例)

scoop install neovim git ripgrep fd unzip

1.3 Nerd Font(图标不炸框)

下载 Hack Nerd Font → 安装 → 终端设为该字体

1.4 备份旧配置(可选,但强烈建议)

1
2
3
mv ~/.config/nvim{,.bak}      # Linux / macOS
# Windows PowerShell
Move-Item $env:LOCALAPPDATA\nvim $env:LOCALAPPDATA\nvim.bak

1.5 克隆 starter 模板

1
2
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git # 去掉 git 历史,方便以后自己建仓库

1.6 首次启动即自动下插件

nvim # 等待左下角 100 % 完成,按 q 关闭欢迎页即安装完毕


  1. 国内网络提速(可选)

如果步骤 2.3 卡在 “Cloning…” 可临时换镜像:

1
git config --global url."https://hub.fastgit.org/".insteadOf "https://github.com/"

安装完再恢复

1
git config --global --unset url."https://hub.fastgit.org/".insteadOf

  1. 验证 & 常用入口

:Lazy – 插件管理器 UI(更新 / 禁用 / 回滚)
:Mason – LSP 服务器/格式化器/调试器一键装
:checkhealth – 官方自检,有 ❌ 就按提示装缺失依赖


  1. 卸载 / 重置(一条命令)

1
2
3
4
rm -rf ~/.config/nvim \
~/.local/share/nvim \
~/.local/state/nvim \
~/.cache/nvim

进行自定义配置

增加字符画主页