|
| 1 | +# nvim-config |
| 2 | + |
| 3 | +**Battle-tested vim/neovim setup. One command. Any machine.** |
| 4 | + |
| 5 | +A cross-platform installer for a production-grade vim and neovim configuration — |
| 6 | +session management, fuzzy finding, LSP-ready, GitHub Copilot, and full vim/nvim |
| 7 | +key-binding parity. Built for developers who live in the terminal. |
| 8 | + |
| 9 | +```bash |
| 10 | +bash <(curl -fsSL https://raw.githubusercontent.com/yannvr/nvim-config/main/install.sh) |
| 11 | +``` |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## What you get |
| 16 | + |
| 17 | +### Neovim |
| 18 | + |
| 19 | +| Feature | Plugin | |
| 20 | +|---|---| |
| 21 | +| Session picker with favourites, rename, delete | `persisted.nvim` + custom telescope picker | |
| 22 | +| Fuzzy file/buffer/grep search | `telescope.nvim` + `fzf.vim` | |
| 23 | +| Completion + snippets | `nvim-cmp` + `LuaSnip` | |
| 24 | +| GitHub Copilot | `copilot.vim` | |
| 25 | +| Git UI | `vim-fugitive` + `neogit` + `diffview` | |
| 26 | +| Status bar | `vim-airline` | |
| 27 | +| Undo history tree | `vim-mundo` | |
| 28 | +| Auto-pairs, surround, easy-align | tpope suite | |
| 29 | + |
| 30 | +### Vim |
| 31 | + |
| 32 | +| Feature | Mechanism | |
| 33 | +|---|---| |
| 34 | +| Session management | Built-in vimscript (`SessionOpen`, `SessionSave`, `SessionDelete`) | |
| 35 | +| Plugin management | `vim-plug` | |
| 36 | +| Completion | `nvim-cmp` equivalent via `neocomplete` | |
| 37 | +| Fuzzy finding | `fzf.vim` | |
| 38 | + |
| 39 | +### Key bindings (identical in vim and nvim) |
| 40 | + |
| 41 | +| Key | Action | |
| 42 | +|---|---| |
| 43 | +| `\so` | Open session picker | |
| 44 | +| `\ss` | Save current session | |
| 45 | +| `\sd` | Delete current session | |
| 46 | +| `\sq` | Save session and quit | |
| 47 | +| `\f` | Fuzzy file search | |
| 48 | +| `\g` | Live grep | |
| 49 | +| `\b` | Buffer explorer | |
| 50 | +| `jj` | Exit insert mode | |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +## Install options |
| 55 | + |
| 56 | +```bash |
| 57 | +# Neovim only (default) |
| 58 | +./install.sh |
| 59 | + |
| 60 | +# Vim only |
| 61 | +./install.sh --vim |
| 62 | + |
| 63 | +# Both vim and neovim |
| 64 | +./install.sh --both |
| 65 | + |
| 66 | +# Server/remote mode — skips GUI plugins, Copilot, fonts |
| 67 | +./install.sh --remote |
| 68 | + |
| 69 | +# Non-interactive (CI, scripted setup) |
| 70 | +./install.sh --yes |
| 71 | + |
| 72 | +# Preview only — nothing is written |
| 73 | +./install.sh --dry-run |
| 74 | +``` |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Supported platforms |
| 79 | + |
| 80 | +| OS | Vim | Neovim | |
| 81 | +|---|---|---| |
| 82 | +| macOS (Homebrew) | ✓ | ✓ | |
| 83 | +| Ubuntu / Debian | ✓ | ✓ (snap if available) | |
| 84 | +| Fedora / RHEL / Rocky | ✓ | ✓ | |
| 85 | +| Alpine Linux | ✓ | ✓ | |
| 86 | +| Arch / Manjaro | ✓ | ✓ | |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Session management |
| 91 | + |
| 92 | +Opening `nvim` without arguments launches a **telescope session picker** automatically: |
| 93 | + |
| 94 | +- `<CR>` — load session |
| 95 | +- `s` — save / update selected session |
| 96 | +- `S` — save as new name |
| 97 | +- `r` — rename session |
| 98 | +- `d` — delete session (with confirmation) |
| 99 | +- `f` — toggle favourite (★ pinned to top) |
| 100 | +- `R` — refresh list |
| 101 | + |
| 102 | +Sessions are sorted: **favourites first, then most recently modified.** |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## Remote / sysadmin use |
| 107 | + |
| 108 | +The `--remote` flag is optimised for bastion hosts and remote servers: |
| 109 | +- Skips Copilot (requires internet + auth) |
| 110 | +- Skips GUI-dependent plugins (Powerline fonts) |
| 111 | +- Minimal plugin set — fast startup |
| 112 | + |
| 113 | +```bash |
| 114 | +# One-liner for a fresh server |
| 115 | +bash <(curl -fsSL https://raw.githubusercontent.com/yannvr/nvim-config/main/install.sh) --remote --yes |
| 116 | +``` |
| 117 | + |
| 118 | +--- |
| 119 | + |
| 120 | +## dotfiles integration |
| 121 | + |
| 122 | +If you use [yannvr/dotfiles](https://github.com/yannvr/dotfiles), `nvim-config` is included as a submodule and wired into the main installer automatically. |
| 123 | + |
| 124 | +```bash |
| 125 | +git clone --recurse-submodules https://github.com/yannvr/dotfiles ~/dotfiles |
| 126 | +cd ~/dotfiles && ./install.sh |
| 127 | +``` |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## Structure |
| 132 | + |
| 133 | +``` |
| 134 | +nvim-config/ |
| 135 | +├── install.sh # cross-platform installer |
| 136 | +├── test/ |
| 137 | +│ ├── test-install-macos.sh |
| 138 | +│ └── test-install-linux.sh |
| 139 | +├── vim/ # vim config files (symlinked from dotfiles) |
| 140 | +│ ├── .vimrc |
| 141 | +│ ├── .vimrc.conf.base |
| 142 | +│ ├── .vimrc.conf |
| 143 | +│ ├── .vimrc.maps |
| 144 | +│ ├── .vimrc.plugin |
| 145 | +│ └── .vimrc.filetypes |
| 146 | +└── nvim/ # neovim config (symlinked from dotfiles) |
| 147 | + ├── init.lua |
| 148 | + └── lua/ |
| 149 | + ├── plugins/init.lua |
| 150 | + └── sessions/picker.lua |
| 151 | +``` |
| 152 | + |
| 153 | +--- |
| 154 | + |
| 155 | +## Requirements |
| 156 | + |
| 157 | +- `git` ≥ 2.20 |
| 158 | +- `curl` (for vim-plug bootstrap) |
| 159 | +- macOS: [Homebrew](https://brew.sh) |
| 160 | +- Linux: `apt`, `dnf`, `apk`, or `pacman` |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +*Part of the [Hyperdrift](https://hyperdrift.io) toolchain.* |
| 165 | +*Installer built with [typerx](https://github.com/yannvr/typerx) — Python scripting on steroids.* |
0 commit comments