Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 153 additions & 0 deletions .config/nvim/BEDIENUNG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Bedienungsanleitung — Neovim wie IntelliJ (Alltag)

Diese Config ist **LazyVim + eine JetBrains-Tastenebene**: du arbeitest mit deinen IntelliJ-Reflexen
(Ctrl+B, Shift+F6, Alt+Enter, Ctrl+Shift+F …).

> **Zwei Tasten zum Merken:** **`Leertaste`** = Suche in der Datei (`/`, wie in deiner `.vimrc`).
> **`q`** = Leader (Befehlstaste): drück `q` und warte — das which-key-Menü zeigt dir alle Befehle.

---

## 1. Start

```sh
cd ~/mein/projekt
nvim . # öffnet Explorer im Projekt
nvim app/Models/User.php
```

Erststart lädt Plugins automatisch. Sprachserver/Formatter kommen über Mason (`:Mason`),
Treesitter-Parser automatisch beim Öffnen des jeweiligen Dateityps.

---

## 2. Der typische Arbeitstag

### Dateien & Suche
| Was | Taste (JetBrains) | Alternative (Leader `q`) |
|---|---|---|
| In Datei suchen | `Leertaste` | — |
| Search Everywhere | `q` dann `Leertaste` | — |
| Datei öffnen (Go to File) | `Ctrl+Shift+N` | `q f f` |
| Im Projekt suchen (Find in Path) | `Ctrl+Shift+F` | `q /` |
| Zuletzt benutzte Dateien | `Ctrl+E` | `q f r` |
| Symbol in Datei (Go to Class) | `Ctrl+N` | `q s s` |
| Aktion/Befehl finden | `Ctrl+Shift+A` | `q :` |
| Projekt-Explorer (Tree) | `Alt+1` | `q e` |
| Ersetzen im Projekt | `Ctrl+Shift+R` | — |

> In der Auswahlliste: mit `Ctrl+j`/`Ctrl+k` (oder ↑↓) wählen, `Enter` öffnen, `Ctrl+v`/`Ctrl+s` in
> vertikalem/horizontalem Split öffnen, `Esc` schließen.

### Im Code navigieren
| Was | Taste | |
|---|---|---|
| Zur Definition | `Ctrl+B` | (auch `gd`) |
| Zur Implementierung | `Ctrl+Alt+B` | (auch `gI`) |
| Zum Typ | `Ctrl+Shift+B` | (auch `gy`) |
| Verwendungen (Find Usages) | `Alt+F7` | (auch `gr`) |
| Zurück / Vor (Cursor-History) | `Ctrl+Alt+←` / `Ctrl+Alt+→` | |
| Nächster/voriger Fehler | `]d` / `[d` | |

### Code ändern & refactoren
| Was | Taste | |
|---|---|---|
| Kontextaktionen / Quick Fix | `Alt+Enter` oder `Ctrl+.` | (auch `q c a`) |
| Umbenennen (Rename) | `Shift+F6` | (auch `q c r`) |
| Code formatieren | `Ctrl+Alt+L` | (auch `q c f`) |
| Zeile aus-/einkommentieren | `Ctrl+/` | |
| Zeile verschieben | `Alt+Shift+↑` / `Alt+Shift+↓` | |
| Quick-Doku (Hover) | `Ctrl+Q` oder `K` | |
| Parameter-Info | `Ctrl+P` | |
| Autovervollständigung | tippen → Liste; `Enter` bestätigt, `Ctrl+Space` erzwingt | |

### Diagnose / Fehler
- Fehlerliste (Trouble): `q x x`
- Fehler unter Cursor anzeigen: `q c d`
- Springen: `]d` / `[d` (Diagnose), `]e` / `[e` (nur Fehler)

### Git
- **lazygit** (volle Git-UI): `q g g`
- Zeilen-Blame: `q g b` · Datei-History: `q g f`
- Hunk vor/zurück: `]h` / `[h`

### Terminal
- Terminal auf/zu: `Alt+F12`

### Fenster, Tabs & Buffer
| Was | Taste |
|---|---|
| Zwischen Splits springen | `Ctrl+h/j/k/l` |
| Vertikal/horizontal teilen | `q \|` / `q -` |
| Nächster/voriger Buffer (Tab) | `Shift+l` / `Shift+h` |
| Buffer schließen | `q b d` |

---

## 3. Pro Sprache/Framework

### PHP / Laravel
- **Intelephense** liefert Completion, Go-to-Definition, Hover, Diagnostics.
- **Rename (`Shift+F6`) & Code-Actions (`Alt+Enter`)** brauchen **Intelephense Premium**.
Kostenlose Alternative: in `lua/config/lazy.lua` `vim.g.lazyvim_php_lsp = "phpactor"` setzen.
- **Formatieren** mit **Laravel Pint** (`Ctrl+Alt+L`) — legt eine `pint.json` ins Projekt, dann wird
euer Team-Standard genutzt. Braucht ein `php`-Binary (`brew install php composer`).
- **Blade** (`*.blade.php`): eigenes Highlighting (Treesitter), Format via `blade-formatter`.
- **Artisan/Routes/Views** über `laravel.nvim`: `q L` (Menü), z.B. `q L a` (Artisan).

### Vue / Nuxt
- `.vue`-Dateien: **vtsls** (TypeScript-Intelligenz inkl. Komponenten) + **vue_ls** (Template/SFC).
- Nuxt braucht keinen eigenen Server — funktioniert über die Vue/TS-Server. Auto-Imports werden erkannt,
sobald das Projekt einmal `npm install` gelaufen ist.
- Formatieren: **Prettier** (`Ctrl+Alt+L`).
- *Hinweis:* `vue_ls` wird automatisch repariert (es zieht sonst eine inkompatible TypeScript-7-Preview
und stürzt ab). Beim allerersten Mal ggf. einmal `:VueFixTs` ausführen und Neovim neu starten.

### TypeScript / JavaScript
- **vtsls**: Completion, Typen, Go-to-Definition, Refactorings; **ESLint** als Linter, **Prettier** zum Formatieren.

### Tailwind / CSS
- **Tailwind**: Klassen-Autocomplete **mit Farb-Vorschau** — auch in Blade- und Vue-Dateien.
Greift, sobald das Projekt eine Tailwind-Config hat.
- **CSS/SCSS/LESS**: `cssls` (Hover, Completion) + Prettier.

---

## 4. Wenn eine Taste nicht geht (Terminal-Protokoll)

Chords wie `Ctrl+.`, `Ctrl+Shift+F`, `Ctrl+Alt+L` brauchen das **kitty keyboard protocol**:
- **Ghostty** (macOS): läuft ✓
- **Windows Terminal** (WSL): ab **v1.25** ✓ — sonst nimm die `q`-Alternativen aus den Tabellen.

Schnelltest: `nvim` → `i` → `Ctrl+v` → dann `Ctrl+.` drücken.
- Erscheint etwas wie `^[[46;5u` → Protokoll aktiv ✓
- Kommt nur `.` → Terminal aktualisieren/wechseln, bis dahin die `q`-Wege nutzen.

---

## 5. Wartung & Hilfe

| Befehl | Zweck |
|---|---|
| `:Lazy` | Plugins (Status, Update mit `U`, Sync mit `S`) |
| `:Mason` | LSP-Server & Formatter installieren/prüfen |
| `:checkhealth` | Diagnose der ganzen Installation |
| `:LspInfo` | Welche Sprachserver hängen am aktuellen Buffer? |
| `q s k` | Alle Tastenkürzel durchsuchen |

**Anpassen:** Tasten in `lua/config/keymaps.lua`, Optionen (inkl. Leader) in `lua/config/options.lua`,
Sprachen in `lua/config/lazy.lua` (oder `:LazyExtras`), eigene Plugins in `lua/plugins/*.lua`.

---

## 6. Aktivieren (fest installieren)

Bisher läuft alles isoliert testbar über `NVIM_APPNAME=nvim-jb nvim` (verändert deine bestehende
`~/.config/nvim` nicht). Zum Standard machen:

```sh
cd ~/github/dotfiles
./install.sh # kopiert nach ~/.config/nvim und sichert eine vorhandene Config als Backup
```

Danach startet `nvim` (bzw. dein Alias `vim`) direkt diese Config.
74 changes: 74 additions & 0 deletions .config/nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Neovim mit IntelliJ/JetBrains-Feeling (LazyVim)

Diese Neovim-Config ist [LazyVim](https://www.lazyvim.org) + eine eigene **JetBrains-Keymap-Ebene**.
Die JetBrains-Shortcuts zeigen auf echte IDE-Features (LSP, Snacks-Picker, conform, which-key), nicht
nur auf Tastenkombis.

## Voraussetzungen

| Tool | Zweck | Installation |
|---|---|---|
| Neovim ≥ 0.10 | Basis (kitty-Protokoll-Client) | linuxbrew: `brew install neovim` |
| ripgrep, fd | Find in Path / Dateisuche | `brew install ripgrep fd` |
| Node ≥ 18 (20+ empfohlen) | LSP-Server (intelephense, vue_ls, vtsls, …) | `brew install node` |
| php + composer | Laravel Pint (Format) & Artisan-Runtime | `brew install php composer` |

**Terminal:** Chords wie `Ctrl+.`, `Ctrl+Shift+F`, `Ctrl+Alt+L` brauchen das **kitty keyboard protocol**.
- **Ghostty** (macOS): standardmäßig aktiv ✓
- **Windows Terminal** (WSL): ab **v1.25** (März 2026) ✓ — vorher greifen die `q`-Fallbacks (Leader).

## Aktivierung

```sh
# Variante A: fest installieren (aus dem dotfiles-Repo). Sichert eine vorhandene
# ~/.config/nvim automatisch nach ~/.config/nvim.backup.<ts>
./install.sh

# Variante B: gefahrlos testen, ohne die bestehende Config anzufassen
ln -s ~/github/dotfiles/.config/nvim ~/.config/nvim-jb
NVIM_APPNAME=nvim-jb nvim
```

Beim ersten Start installiert LazyVim automatisch alle Plugins; die LSP-Server/Formatter kommen über
Mason (`:Mason`), Treesitter-Parser über `:TSInstall`.

## JetBrains-Tastenbelegung (Windows/Linux-Keymap, Ctrl-basiert)

**Leader = `q`**, **`Leertaste` = Suche** (`/`, wie in der alten `.vimrc`), Makro-Aufnahme ist aus.

`[proto]` = braucht kitty-Protokoll (Ghostty / Windows Terminal ≥ 1.25).

| Aktion | Shortcut | | Aktion | Shortcut |
|---|---|---|---|---|
| Search Everywhere | `q` `Space` | | Go to Definition | `Ctrl+B` |
| Find in Path (grep) | `Ctrl+Shift+F` `[proto]` | | Go to Implementation | `Ctrl+Alt+B` `[proto]` |
| Go to File | `Ctrl+Shift+N` `[proto]` | | Go to Type Definition | `Ctrl+Shift+B` `[proto]` |
| Go to Symbol (Datei) | `Ctrl+N` | | Find Usages | `Alt+F7` |
| Find Action | `Ctrl+Shift+A` `[proto]` | | Context Actions / Quick Fix | `Alt+Enter` / `Ctrl+.` |
| Recent Files | `Ctrl+E` | | Rename | `Shift+F6` |
| Project-Explorer | `Alt+1` | | Quick Documentation | `Ctrl+Q` (oder `K`) |
| Reformat Code | `Ctrl+Alt+L` `[proto]` | | Parameter Info | `Ctrl+P` (normal mode) |
| Comment Line | `Ctrl+/` | | Navigate Back / Forward | `Ctrl+Alt+←/→` `[proto]` |
| Replace in Path | `Ctrl+Shift+R` `[proto]` | | Move Line Up/Down | `Alt+Shift+↑/↓` |
| Terminal | `Alt+F12` | | Laravel-Menü | `q L` |

**Absichtlich Vim-typisch belassen** (nicht auf JetBrains gebogen): `Ctrl+R` = Redo, `Ctrl+W` = Fenster,
`Ctrl+D/U` = Scroll, `Ctrl+V` = Visual-Block. Alles ist zusätzlich über `q` (which-key) erreichbar.

## Sprachen & Frameworks

- **PHP**: intelephense (Completion/Navigation). *Rename & Code-Actions brauchen Intelephense Premium
oder wechsle in `lua/config/lazy.lua` auf `vim.g.lazyvim_php_lsp = "phpactor"` (kostenlos).*
- **Laravel/Blade**: Blade-Filetype + Treesitter-Grammar + `blade-formatter`; `laravel.nvim` unter `q L`.
- **Vue/Nuxt**: vue_ls + vtsls (`<script setup lang="ts">` inkl. Nuxt-Auto-Imports). `vue_ls` zieht sonst
die kaputte TypeScript-7-Preview — `lua/plugins/vue.lua` pinnt seine TS automatisch auf 5.x (bzw. `:VueFixTs`).
- **TypeScript/JavaScript**: vtsls; ESLint + Prettier.
- **Tailwind**: tailwindcss-LSP inkl. Blade-Dateien (Farb-Swatches in der Completion).
- **CSS/SCSS/LESS**: cssls + Prettier.

## Anpassen

- Keymaps: `lua/config/keymaps.lua`
- Optionen: `lua/config/options.lua`
- Extras (Sprachen): `lua/config/lazy.lua` bzw. `:LazyExtras`
- Eigene Plugins/Overrides: `lua/plugins/*.lua`
2 changes: 2 additions & 0 deletions .config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
9 changes: 0 additions & 9 deletions .config/nvim/init.vim

This file was deleted.

36 changes: 36 additions & 0 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"LazyVim": { "branch": "main", "commit": "c10948c50b18fae7f256433afdef09e432410480" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "05e8787020dcfdb937bf2ff23855ea2415b4e072" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" },
"grug-far.nvim": { "branch": "main", "commit": "beb2ce490b72048c587e8a3d919cba1b4608bb04" },
"jb.nvim": { "branch": "main", "commit": "1cd3e9aeb81cd4b60b7b094a7900e6fc39d7dd79" },
"laravel.nvim": { "branch": "main", "commit": "261bbd12aaf0ebc589ed7c1137071b0141f1c14c" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mini.ai": { "branch": "main", "commit": "25248c6aa002391936a6200f12d1466015987133" },
"mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" },
"mini.pairs": { "branch": "main", "commit": "b1fd9df3bb4a41c8f45778a3859ee80ef6b367e3" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lint": { "branch": "master", "commit": "a219b2c9e5b4765e5c845aba119dad55806fcaf1" },
"nvim-lspconfig": { "branch": "master", "commit": "5955a100ae7155962330643924e21a798b9bdc91" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}
10 changes: 10 additions & 0 deletions .config/nvim/lazyvim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extras": [

],
"install_version": 8,
"news": {
"NEWS.md": "11866"
},
"version": 8
}
3 changes: 3 additions & 0 deletions .config/nvim/lua/config/autocmds.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- Add your autocmds here.
-- LazyVim's default autocmds live in `lazyvim.config.autocmds` and are loaded
-- automatically. This file is for your own additions.
Loading