diff options
| author | 2026-09-10 22:30:45 +0200 | |
|---|---|---|
| committer | 2026-09-10 22:30:45 +0200 | |
| commit | 30f0d55e60832e9172e565c8fb03b419515058f7 (patch) | |
| tree | 626c561d6f00581c6e86cc2e01e4857023ca1521 /neovim/.config/nvim/README.md | |
| parent | 273ac7c66a45647737e208142297b57998f426f2 (diff) | |
| download | dotfiles-30f0d55e60832e9172e565c8fb03b419515058f7.tar.gz dotfiles-30f0d55e60832e9172e565c8fb03b419515058f7.tar.bz2 dotfiles-30f0d55e60832e9172e565c8fb03b419515058f7.zip | |
Add README to the Neovim config
Documents the file/folder layout, what each lua/plugins/*.lua group
contains, the managed language servers, how to add a new plugin, and
the (now fully independent) relationship to Vim's own vimrc.
Diffstat (limited to 'neovim/.config/nvim/README.md')
| -rw-r--r-- | neovim/.config/nvim/README.md | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/neovim/.config/nvim/README.md b/neovim/.config/nvim/README.md new file mode 100644 index 0000000..5092af0 --- /dev/null +++ b/neovim/.config/nvim/README.md | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | # Neovim config | ||
| 2 | |||
| 3 | Standalone, Neovim-only Lua config — independent of `../../vim/.vim/vimrc` | ||
| 4 | (Vim's own config; it is not read by Neovim at all). Plugin manager is | ||
| 5 | [lazy.nvim](https://github.com/folke/lazy.nvim), which bootstraps itself on | ||
| 6 | first launch — no submodule needed. | ||
| 7 | |||
| 8 | ## Layout | ||
| 9 | |||
| 10 | ``` | ||
| 11 | init.lua Entry point: sets <leader>, then loads config/* in order | ||
| 12 | ftplugin/ | ||
| 13 | python.lua Per-filetype settings for *.py (tabstop/shiftwidth/etc.) | ||
| 14 | lua/config/ Everything that isn't a plugin declaration | ||
| 15 | options.lua vim.opt settings (search, undo, whitespace display, ...) | ||
| 16 | keymaps.lua Global keymaps not owned by a specific plugin | ||
| 17 | autocmds.lua Global autocmds not owned by a specific plugin | ||
| 18 | lazy.lua Bootstraps lazy.nvim and points it at lua/plugins/ | ||
| 19 | lua/plugins/ One file per plugin (or small plugin group), each | ||
| 20 | returning a lazy.nvim plugin spec (or list of specs) | ||
| 21 | lazy-lock.json Plugin versions pinned by lazy.nvim - commit changes | ||
| 22 | to this whenever plugins are added/updated | ||
| 23 | .gitignore Ignores spell/ (spellfile downloads) | ||
| 24 | ``` | ||
| 25 | |||
| 26 | `lua/config/*` and `lua/plugins/*` are auto-loaded: `init.lua` does | ||
| 27 | `require("config.lazy")`, which calls `require("lazy").setup("plugins", ...)` | ||
| 28 | — lazy.nvim automatically picks up every file under `lua/plugins/`, so a new | ||
| 29 | file dropped there just needs to `return { "author/repo", ... }` (or a list of | ||
| 30 | such tables) and it's included on next launch. | ||
| 31 | |||
| 32 | ## What's in `lua/plugins/` | ||
| 33 | |||
| 34 | | File | Plugin(s) | Purpose | | ||
| 35 | |---|---|---| | ||
| 36 | | `colorscheme.lua` | vim-janah | Color scheme, falls back to `desert` if it fails to load | | ||
| 37 | | `statusline.lua` | vim-airline, vim-airline-themes, tmuxline.vim | Status/tab line | | ||
| 38 | | `filetree.lua` | neo-tree.nvim | File explorer sidebar with git-status colors (`<leader>e` to toggle) | | ||
| 39 | | `fuzzyfinder.lua` | ctrlp.vim | Fuzzy file finder (ripgrep-backed if `rg` is on PATH) | | ||
| 40 | | `editing.lua` | nerdcommenter, quick-scope | Comment toggling, `f`/`F`/`t`/`T` target highlighting | | ||
| 41 | | `git.lua` | vim-fugitive, vim-signify | `:Git` commands, git-diff gutter signs | | ||
| 42 | | `ale.lua` | ALE | Linters/fixers only — `g:ale_disable_lsp = 1` so it doesn't fight the LSP client's diagnostics/hover/go-to-def | | ||
| 43 | | `langs.lua` | vim-ansible-yaml, vim-terraform | Only loaded if `ansible`/`terraform` is on PATH (lazy.nvim `cond`) | | ||
| 44 | | `claude-code.lua` | claude-code.nvim (+ plenary.nvim) | `:ClaudeCode` and friends | | ||
| 45 | | `treesitter.lua` | nvim-treesitter (`main` branch) | Parser installs + syntax highlighting | | ||
| 46 | | `autopairs.lua` | nvim-autopairs, nvim-ts-autotag | Auto-close brackets/quotes/HTML+JSX tags | | ||
| 47 | | `completion.lua` | blink.cmp (+ friendly-snippets) | Completion popup, Tab-to-accept (`super-tab` preset) | | ||
| 48 | | `lsp.lua` | nvim-lspconfig, mason.nvim, mason-lspconfig.nvim | Installs & enables language servers, wires blink.cmp's capabilities into them | | ||
| 49 | |||
| 50 | ## Language servers | ||
| 51 | |||
| 52 | Managed by Mason, auto-installed via `lua/plugins/lsp.lua`'s | ||
| 53 | `ensure_installed`: `pyright`, `lua_ls`, `bashls`, `terraformls`, `yamlls`, | ||
| 54 | `ts_ls`, `cssls`, `html`. `clangd` is enabled separately (not | ||
| 55 | Mason-installed) since it already ships with Xcode Command Line Tools. | ||
| 56 | |||
| 57 | Refactoring/navigation (rename, code actions, references, go-to-definition, | ||
| 58 | hover) come from Neovim's built-in default LSP keymaps (`:help lsp-defaults`) | ||
| 59 | once a server attaches — `grn`, `gra`, `grr`, `gri`, `gO`, `K`, `<C-]>`. No | ||
| 60 | extra plugin or keymap needed for these. | ||
| 61 | |||
| 62 | ## Adding a new plugin | ||
| 63 | |||
| 64 | Drop a new file in `lua/plugins/` (or add to an existing group file if it | ||
| 65 | belongs there) returning a lazy.nvim spec, e.g.: | ||
| 66 | |||
| 67 | ```lua | ||
| 68 | return { | ||
| 69 | "author/plugin-name", | ||
| 70 | opts = {}, | ||
| 71 | } | ||
| 72 | ``` | ||
| 73 | |||
| 74 | Restart Neovim (or `:Lazy sync`) to install it, then commit the updated | ||
| 75 | `lazy-lock.json` alongside your change. | ||
| 76 | |||
| 77 | ## Relationship to Vim | ||
| 78 | |||
| 79 | Vim and Neovim used to share one `vimrc` (`has('nvim')` branches handled the | ||
| 80 | differences). They're now fully independent: Vim keeps `../../vim/.vim/vimrc` | ||
| 81 | with its own plugin manager (vim-plug) and completion (YouCompleteMe + | ||
| 82 | jedi-vim); nothing under this directory affects Vim, and nothing in | ||
| 83 | `vim/.vim` affects Neovim. | ||
