Personal Neovim setup built on lazy.nvim + Lua · macOS / Linux first-class · Windows partial
treesitter · LSP · Telescope · Flutter · nordfox
nordfox · neo-tree · lualine
# clone into config dir
git clone https://github.com/zlj-zz/nvim.git ~/.config/nvim
# system deps (macOS)
brew install ripgrep gopls ctags node python3
pip3 install pynvim && npm install -g neovim
# optional: Nerd Font + input-method switcher
brew install --cask font-hack-nerd-font
brew tap daipeihust/tap && brew install im-selectOpen Neovim once → :Lazy sync → :checkhealth.
~/.config/nvim
├── init.lua entry → config/* → lazy → theme
├── lua/
│ ├── config/ env · options · keymaps · autocmds · theme
│ ├── plugins/ lazy specs by domain (spec + setup co-located)
│ ├── funcs.lua helpers (smart close, splits, …)
│ └── utils.lua map / opt wrappers
└── ftplugin/ filetype locals (markdown snippets, …)
Global keys → lua/config/keymaps.lua. Plugin keys → owning lua/plugins/*.lua.
| Plugin | Role |
|---|---|
| lazy.nvim | Plugin manager |
| nvim-treesitter (+ textobjects) | Highlight · fold · motions |
| nvim-lspconfig | LSP client configs |
| nvim-cmp + LuaSnip | Completion · snippets |
| conform.nvim | Formatting |
| Plugin | Role |
|---|---|
| Telescope (+ fzf-native) | Fuzzy find / grep |
| neo-tree.nvim | File explorer |
| aerial.nvim | Code outline |
| dropbar.nvim | Winbar breadcrumbs |
| trouble.nvim | Diagnostics panel |
| lualine | Statusline · buffers |
| nvim-notify | Notifications |
| dressing.nvim | vim.ui input / select |
| dashboard-nvim | Start screen |
| toggleterm | Integrated terminal |
| undotree | Undo history |
| Plugin | Role |
|---|---|
| nvim-hlslens | Search match counts |
| tiny-glimmer | Undo / redo flash |
| yanky.nvim | Yank history |
| Comment.nvim | Toggle comments |
| nvim-autopairs | Auto pairs |
| indent-blankline | Indent guides |
| vim-easy-align | Align (ga) |
| vim-visual-multi | Multi-cursor |
| splitjoin.vim | Split / join |
| Plugin | Role |
|---|---|
| gitsigns | Hunks · blame · stage |
| pigit.nvim | Git UI (local) |
| flutter-tools | Flutter run / hot reload / Dart LSP |
| dart-vim-plugin | Dart filetype · dartfmt on save |
| pubspec-assist | pubspec.yaml helpers |
| render-markdown | In-buffer markdown |
| markdown-preview.nvim | Browser markdown preview |
| supermaven-nvim | AI inline completion |
| loom.nvim | Session / workspace snaps (local) |
Cycle with <leader>tc (persisted). Default: nordfox.
nordfox · nightfox · carbonfox
<leader> = Space.
- Global →
lua/config/keymaps.lua - Plugin → owning
lua/plugins/*.lua(theme cycle inlua/config/theme.lua)
Markdown insert snippets live in ftplugin/markdown.vim (,b bold, ,c fence, ,a link, …). Placeholder jump: <leader><leader> → next <++>.
Servers are enabled in lua/plugins/lsp.lua. Install the binaries yourself:
| Language | Server / notes |
|---|---|
| Go | gopls |
| Python | basedpyright |
| TypeScript | vtsls |
| Lua | lua_ls |
| Rust | rust_analyzer (via rustup) |
| Bash | bashls |
| HTML / CSS / JSON | html · cssls · jsonls |
| YAML | yamlls |
| Swift | sourcekit (Xcode CLI) |
| Dart / Flutter | flutter-tools (see below) |
Formatters used by conform (when available): stylua · black · prettier · shfmt · gofumpt / goimports.
Requires the Flutter SDK on PATH (flutter · dart). Open a .dart buffer to load the stack (ft = dart).
| Feature | Detail |
|---|---|
| Dart LSP | Via flutter-tools · same keys as above (gd gh <leader>rn …) |
| Format on save | LSP format + dart_format_on_save (line length 100) |
| Widget guides | Vertical guides for widget tree |
| Closing tags | Virtual // WidgetName after closing ) |
| Statusline | App version · device · project config (lualine decorations) |
| Dev log | Opens in a new tab |
| Document color | Swatch via vim.lsp.document_color (Neovim 0.12+) |
| Outline | Prefer Aerial (ti); :FlutterOutlineToggle still available |
FVM is off (fvm = false). Debugger integration is off.
No custom <leader>f* maps — use commands (or :FlutterCommands picker):
| Command | Action |
|---|---|
:FlutterCommands |
Command palette |
:FlutterRun |
Run app |
:FlutterReload |
Hot reload |
:FlutterRestart |
Hot restart |
:FlutterQuit |
Stop app |
:FlutterDevices |
Pick device |
:FlutterEmulators |
List emulators |
:FlutterDevTools |
Start DevTools |
:FlutterPubGet / :FlutterPubUpgrade |
Pub |
:FlutterLogToggle / :FlutterLogClear |
Dev log |
:FlutterLspRestart |
Restart Dart analysis server |
:FlutterRename |
Project-aware rename |
Also: :FlutterAttach · :FlutterDetach · :FlutterCopyProfilerUrl · :FlutterOpenDevTools · :FlutterInspectWidget.
Note:
<leader>fcis the git conflict picker, not Flutter.
- Input method — macOS only; switches to ABC on
InsertLeavewhenim-selectis installed. Missing binary → silent no-op. - Supermaven — first run:
:SupermavenUseFree. - Local plugins —
loom.nvim,pigit.nvim,neominimap.nvimresolve viadir =under~/projects/….
Personal config — use / fork as you like.