aboutsummaryrefslogtreecommitdiffstats
path: root/neovim
diff options
context:
space:
mode:
Diffstat (limited to 'neovim')
-rw-r--r--neovim/.config/nvim/README.md83
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
3Standalone, 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
6first launch — no submodule needed.
7
8## Layout
9
10```
11init.lua Entry point: sets <leader>, then loads config/* in order
12ftplugin/
13 python.lua Per-filetype settings for *.py (tabstop/shiftwidth/etc.)
14lua/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/
19lua/plugins/ One file per plugin (or small plugin group), each
20 returning a lazy.nvim plugin spec (or list of specs)
21lazy-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
29file dropped there just needs to `return { "author/repo", ... }` (or a list of
30such 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
52Managed 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
55Mason-installed) since it already ships with Xcode Command Line Tools.
56
57Refactoring/navigation (rename, code actions, references, go-to-definition,
58hover) come from Neovim's built-in default LSP keymaps (`:help lsp-defaults`)
59once a server attaches — `grn`, `gra`, `grr`, `gri`, `gO`, `K`, `<C-]>`. No
60extra plugin or keymap needed for these.
61
62## Adding a new plugin
63
64Drop a new file in `lua/plugins/` (or add to an existing group file if it
65belongs there) returning a lazy.nvim spec, e.g.:
66
67```lua
68return {
69 "author/plugin-name",
70 opts = {},
71}
72```
73
74Restart Neovim (or `:Lazy sync`) to install it, then commit the updated
75`lazy-lock.json` alongside your change.
76
77## Relationship to Vim
78
79Vim and Neovim used to share one `vimrc` (`has('nvim')` branches handled the
80differences). They're now fully independent: Vim keeps `../../vim/.vim/vimrc`
81with its own plugin manager (vim-plug) and completion (YouCompleteMe +
82jedi-vim); nothing under this directory affects Vim, and nothing in
83`vim/.vim` affects Neovim.