Skip to content

Commit ec8084b

Browse files
committed
add claude file
1 parent a9d343d commit ec8084b

File tree

1 file changed

+136
-0
lines changed

1 file changed

+136
-0
lines changed

CLAUDE.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Overview
6+
7+
This is a Neovim configuration based on kickstart.nvim - a single-file starter configuration that prioritizes being small, documented, and understandable. The configuration has been customized with additional plugins and settings.
8+
9+
## Architecture
10+
11+
### Single-File Configuration
12+
The entire configuration is contained in `init.lua` (lines 1-1001). This is intentional - kickstart.nvim uses a single-file approach as a teaching tool and reference. While splitting into modules is possible, the current structure keeps everything in one place for clarity.
13+
14+
### Plugin Management
15+
- **Plugin Manager**: lazy.nvim (installed at init.lua:122-130)
16+
- **Plugin Definitions**: All plugins defined in the `lazy.setup()` call starting at init.lua:143
17+
- **Custom Plugins**: Additional user plugins can be added in `lua/custom/plugins/init.lua`
18+
19+
### Key Plugin Categories
20+
21+
1. **LSP Configuration** (init.lua:435-698)
22+
- Mason for LSP installation (init.lua:454-456)
23+
- Configured servers: `pyright`, `zls`, `rust_analyzer`, `ts_ls`, `lua_ls`
24+
- LSP capabilities enhanced by blink.cmp (init.lua:624)
25+
- Autocommands for LSP attach events setup keymaps and highlighting
26+
27+
2. **Completion** (init.lua:746-837)
28+
- blink.cmp for autocompletion
29+
- LuaSnip for snippet expansion
30+
- Default keymap preset uses `<c-y>` to accept
31+
32+
3. **Telescope** (init.lua:255-359)
33+
- Fuzzy finder with vertical layout
34+
- Extensions: fzf, ui-select
35+
- Leader-based keymaps for searching files, grep, diagnostics, etc.
36+
37+
4. **Navigation & Movement**
38+
- Harpoon2 for file bookmarking (init.lua:375-432)
39+
- Flash.nvim for rapid cursor movement (init.lua:361-373)
40+
- Oil.nvim for file browsing (init.lua:964-978)
41+
- vim-tmux-navigator for seamless tmux/vim navigation (init.lua:154-170)
42+
43+
5. **Formatting** (init.lua:701-744)
44+
- conform.nvim handles formatting
45+
- Format on save enabled (except for C/C++)
46+
- Configured formatters: stylua (Lua), prettier (JS/TS/CSS/HTML/JSON)
47+
48+
## Common Commands
49+
50+
### Plugin Management
51+
```
52+
:Lazy " View plugin status
53+
:Lazy update " Update all plugins
54+
:Mason " Manage LSP servers and tools (press g? for help)
55+
```
56+
57+
### LSP & Diagnostics
58+
```
59+
:LspInfo " Show LSP client status
60+
:ConformInfo " Show formatter status
61+
<leader>q " Open diagnostic quickfix list
62+
```
63+
64+
### File Navigation
65+
```
66+
<leader>sf " Search files
67+
<leader>sg " Live grep
68+
<leader><leader> " Find buffers
69+
<leader>sn " Search Neovim config files
70+
- " Open Oil file browser (parent directory)
71+
```
72+
73+
### Harpoon (File Bookmarking)
74+
```
75+
<leader>a " Add file to Harpoon
76+
<leader>e " Toggle Harpoon menu
77+
<leader>1-4 " Jump to Harpoon mark 1-4
78+
<leader>n/<leader>p " Next/Previous Harpoon mark
79+
```
80+
81+
### Code Operations
82+
```
83+
grn " LSP rename
84+
gra " Code action
85+
grr " Find references (Telescope)
86+
grd " Go to definition (Telescope)
87+
gri " Go to implementation (Telescope)
88+
grt " Go to type definition (Telescope)
89+
gO " Document symbols (Telescope)
90+
gW " Workspace symbols (Telescope)
91+
<leader>m " Format buffer
92+
```
93+
94+
## Configuration Details
95+
96+
### Settings
97+
- Leader key: `<space>` (init.lua:2)
98+
- Line numbers: relative + absolute (init.lua:9-10)
99+
- No line wrapping (init.lua:19)
100+
- Clipboard: synced with OS (init.lua:21-23)
101+
- Undo history: persisted (init.lua:29)
102+
- Scrolloff: 10 lines (init.lua:61)
103+
- Cursor: blinking block in normal mode, vertical bar in insert (init.lua:68-72)
104+
105+
### Treesitter Languages
106+
Auto-installed parsers for: zig, python, typescript, rust, htmldjango, bash, c, html, lua, markdown, vim (init.lua:912-929)
107+
108+
### Color Scheme
109+
Currently using kanso.nvim (init.lua:848-856). Several commented-out alternatives available (gruvbox-material, catppuccin, kanagawa, zenbones, vague).
110+
111+
### Custom Keymaps
112+
- `<C-d>/<C-u>`: Page down/up with recentering (init.lua:76-77)
113+
- `<C-h/j/k/l>`: Window navigation (init.lua:98-101)
114+
- `<Esc>`: Clear search highlights (init.lua:81)
115+
116+
## Development Notes
117+
118+
### Modifying Configuration
119+
The main configuration is in `init.lua`. When making changes:
120+
1. Restart Neovim or `:source $MYVIMRC`
121+
2. Run `:Lazy sync` if plugins were added/removed
122+
3. Run `:Mason` to install new LSP servers or formatters
123+
124+
### Adding New LSP Servers
125+
1. Add server to the `servers` table (init.lua:635-663)
126+
2. Add to `ensure_installed` if needed (init.lua:678-681)
127+
3. Restart Neovim - mason-tool-installer will auto-install
128+
129+
### Adding Formatters
130+
1. Install via Mason or ensure it's in PATH
131+
2. Add to `formatters_by_ft` table (init.lua:731-742)
132+
3. Optionally add to `ensure_installed` (init.lua:679)
133+
134+
### Plugin Organization
135+
- Custom user plugins: Add to `lua/custom/plugins/init.lua` or create new files in that directory
136+
- Kickstart example plugins: Located in `lua/kickstart/plugins/` (currently commented out/unused)

0 commit comments

Comments
 (0)