src.nth.io/

summaryrefslogtreecommitdiff
path: root/README.md
blob: 78e6224401f8eb0901af54cc064cd1bd338c00a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Emacs Configuration

Personal Emacs configuration focused on simplicity and modern tooling while respecting default Emacs keybindings.

## Philosophy

- Clean and minimal configuration
- Prefer built-in Emacs functionality when possible
- Use modern, actively maintained packages
- Respect default Emacs keybindings
- Single `init.el` file for simplicity

## Structure

```
~/.emacs.d/
├── init.el           # Main configuration file
├── elisp/            # Custom configuration modules
│   ├── c-init.el     # C/C++ configuration
│   └── ansible-init.el # Ansible/YAML configuration
└── README.md         # This file
```

## Key Packages

### Completion Framework
- **vertico** - Vertical completion UI
- **orderless** - Flexible completion style (space-separated patterns)
- **consult** - Enhanced commands (buffer switching, search, etc.)
- **marginalia** - Helpful annotations in completion candidates

### Development
- **company** - Auto-completion
- **flycheck** - Syntax checking
- **treesit-auto** - Tree-sitter modes with automatic grammar installation
- **magit** - Git interface
- **forge** - GitHub/GitLab integration for magit
- **magit-todos** - Show TODO/FIXME comments in magit status

### Editing
- **paredit** - Structured editing for Lisp
- **expand-region** - Smart region expansion
- **move-text** - Move lines/regions up and down
- **visual-regexp** - Visual feedback for regexp replace
- **yasnippet** - Snippet expansion
- **emmet-mode** - HTML/CSS abbreviation expansion
- **rainbow-delimiters** - Colorize nested delimiters

### Modes
- **markdown-mode** - Markdown editing
- **terraform-mode** - Terraform configuration files
- **yaml-mode** - YAML files
- **json-mode** - JSON files
- **hgignore-mode** - Mercurial ignore files

### Utilities
- **ibuffer-project** - Group buffers by project
- **exec-path-from-shell** - Import shell environment variables
- **rg** - ripgrep integration

## Key Bindings

### Custom Bindings
- `C-c c` - Compile
- `C-c r` - Recompile
- `C-c a` - Align regexp
- `C-c g` - Consult ripgrep (search with preview)
- `C-c s` - Launch eshell
- `C-x g` - Magit status
- `C-x C-b` - ibuffer (better buffer list)
- `C-=` - Expand region
- `M-p` / `M-n` - Move text up/down
- `M-%` - Visual regexp replace
- `C-M-%` - Visual regexp query replace

### Enhanced Default Bindings
- `M-x` - Command execution (enhanced with vertico)
- `C-x b` - Switch buffer (enhanced with consult)
- `M-y` - Yank from kill ring (enhanced with consult)
- `M-/` - Company completion

## Installation

1. Clone this repository:
   ```bash
   git clone [email protected]:lukehoersten/emacs.d.git ~/.emacs.d
   ```

2. Launch Emacs - packages will auto-install on first run

3. For tree-sitter modes, grammars install automatically when first opening a file

## Tree-sitter Support

Tree-sitter provides faster, more accurate syntax highlighting and parsing. Enabled automatically for:
- JavaScript/TypeScript
- JSON
- Python
- And many more (via `treesit-auto`)

Grammars install automatically on first use.

## Customizations

Emacs customizations are redirected to `custom.el` (gitignored) to keep `init.el` clean.
The configuration uses `package-require` for explicit package management.

## Updating Packages

```elisp
M-x package-refresh-contents
M-x package-update-all
```

## Notes

- Theme: Solarized Light (GUI only)
- Font: Inconsolata-12 (GUI only)
- Shell: eshell (launched automatically on startup)
- Whitespace cleanup on save enabled globally