feat(nvim): migrate editor from vim to Neovim (parity + LSP)
CI / flake (pull_request) Successful in 2m51s
CI / flake (pull_request) Successful in 2m51s
Rewrite editor.nix on programs.nixvim, keeping every prior feature: file tree (nvim-tree, toggle ,,), indent guides (indent-blankline), fugitive, vim-tmux-navigator, Catppuccin Mocha, 2-space hard tabs, and the *Jenkinsfile=groovy rule. Replace the inert ALE with a real LSP stack — nvim-lspconfig, nvim-cmp completion, and tree-sitter for highlighting. Leader is Space; LSP keymaps gd/gr/K/<leader>rn/<leader>ca. Universal servers: nil (Nix), lua_ls, pyright (Python), terraformls. The work box (work.nix) additionally enables omnisharp (C#) and helm_ls (Helm), so the heavy omnisharp closure stays off the personal machines. default.nix drops VISUAL=vim so nixvim's defaultEditor owns $EDITOR/$VISUAL. README and KEYBINDINGS updated (and two stale references corrected). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,12 @@ Keyboard shortcuts have their own reference: [`KEYBINDINGS.md`](./KEYBINDINGS.md
|
||||
| ------------------------------------- | ----------------------------------------------------- |
|
||||
| zsh, CLI tools, tmux, ssh, auto-tmux | [`shell.nix`](./shell.nix) |
|
||||
| git (+ delta, commitizen) | [`git.nix`](./git.nix) |
|
||||
| vim | [`editor.nix`](./editor.nix) |
|
||||
| Neovim (nixvim) + LSP | [`editor.nix`](./editor.nix) |
|
||||
| GUI apps, GTK/Firefox theming, cursor | [`desktop.nix`](./desktop.nix) (graphical hosts only) |
|
||||
|
||||
Shared by every host via [`default.nix`](./default.nix); the work box also layers
|
||||
[`../../system/modules/work/default.nix`](../../system/modules/work/default.nix)
|
||||
on top (work email, its own ssh config, extra packages).
|
||||
[`work.nix`](./work.nix) on top (work email, its own ssh config, extra packages,
|
||||
and the C#/Helm language servers).
|
||||
|
||||
---
|
||||
|
||||
@@ -53,8 +53,9 @@ on top (work email, its own ssh config, extra packages).
|
||||
driven from the shared `../catppuccin-mocha.nix` palette / the catppuccin/bat
|
||||
theme.
|
||||
|
||||
**Env & defaults:** `xdg.enable` on; `PAGER`/`MANPAGER` (bat)/`VISUAL` set in
|
||||
`default.nix`; `xdg.mimeApps` maps web→Firefox, directories→nemo (`desktop.nix`).
|
||||
**Env & defaults:** `xdg.enable` on; `PAGER`/`MANPAGER` (bat) set in `default.nix`
|
||||
(the editor owns `$EDITOR`/`$VISUAL`); `xdg.mimeApps` maps web→Firefox,
|
||||
directories→nemo (`desktop.nix`).
|
||||
|
||||
## tmux
|
||||
|
||||
@@ -90,6 +91,32 @@ Darwin config). foot uses it as its main font automatically. iTerm2's font is a
|
||||
GUI setting — set it to _JetBrainsMono Nerd Font_ (Settings → Profiles → Text →
|
||||
Font) so the tmux statusline glyphs render instead of `?`.
|
||||
|
||||
## Editor (Neovim)
|
||||
|
||||
`nvim` — aliased to `vi`/`vim`, and set as `$EDITOR`/`$VISUAL` — is configured
|
||||
declaratively with **nixvim**, so the same plugins and config are baked in on
|
||||
every host. Migrated from plain vim; the practical gain is a real LSP stack in
|
||||
place of the old (inert) ALE.
|
||||
|
||||
| Feature | Notes |
|
||||
| ------------- | -------------------------------------------------------------------------------------- |
|
||||
| Colorscheme | Catppuccin Mocha (matches the terminal and the rest of the desktop) |
|
||||
| File tree | nvim-tree, toggled with `,,` (comma twice; was nerdtree) |
|
||||
| Indent guides | indent-blankline, on by default (was vim-indent-guides) |
|
||||
| Git | fugitive (`:Git …`) |
|
||||
| Pane nav | vim-tmux-navigator — `Ctrl`+`h/j/k/l` moves across vim splits and tmux panes |
|
||||
| Syntax | tree-sitter (nix, lua, bash, markdown, groovy) — replaces `syntax enable` |
|
||||
| LSP | nvim-cmp completion + servers `nil` (Nix), `lua_ls`, `pyright` (Python), `terraformls` |
|
||||
| Indentation | 2-wide hard tabs (`noexpandtab`, `tabstop`/`shiftwidth` = 2); line numbers on |
|
||||
| Filetypes | `*Jenkinsfile` → groovy |
|
||||
|
||||
Leader is `Space`. LSP keymaps (`gd`, `gr`, `K`, `<leader>rn`, `<leader>ca`) and
|
||||
the file-tree toggle are listed in
|
||||
[`KEYBINDINGS.md`](./KEYBINDINGS.md#neovim). Add a universal language server by
|
||||
enabling it under `programs.nixvim.plugins.lsp.servers` in `editor.nix`;
|
||||
host-specific ones go in that host's module — the work box (`work.nix`) adds
|
||||
`omnisharp` (C#) and `helm_ls` (Helm), kept off the personal machines.
|
||||
|
||||
## git
|
||||
|
||||
Pager is **delta**. **commitizen** is installed on every host; `cz` defaults to
|
||||
|
||||
Reference in New Issue
Block a user