gstrainovic/zid / .claude/skills/lsp
lsp
VerifiedLSP-Anbindung in zid (zls): Protokoll, Client, Sprung zur Definition, Messwerte. Use when touching src/lsp/*, ensureLsp, lspGotoDefinition, or scripts/e2e_lsp.py.
LSP (zls): Sprung zur Definition
- Aufbau:
src/lsp/lsp_proto.zig(reine Logik, unit-getestet:Content-Length-Rahmen, Request/Notification,file://-URIs,firstLocationfür Location | Location[] | LocationLink[],parseMessage) undsrc/lsp/lsp_client.zig(Prozess über stdio, Reader-Thread,id → Methode, Antworten alsTaskResultlsp_definitionmit dem Ergebnis-JSON; Server-Requests werden sofort mitresult: nullbeantwortet). - Start: lazy beim ersten F12/Ctrl+Klick in einer
.zig-Datei (UI.ensureLsp):ZLS_PATH, sonst~/.local/bin/zls, sonstzlsim PATH;ZID_LSP=offschaltet ab. Root istcurrent_directory. Solangeinitializenicht beantwortet ist, springt der Editor per Textmuster (gotoDefinitionLocal). RPCui_state.lsp= off/starting/ready/failed. - Ablauf:
CodeEditor.definition_hook(vom UI inensureEditorHooksjedem Editor gesetzt, weil der UI-Zeiger erst nachinitstabil ist) →lspGotoDefinition: Dokument per didOpen/didChange (Full Sync, nur vor Anfragen, nicht pro Tastendruck) synchronisieren,textDocument/definitionmit Zeichenindex (charIndexAt, Codepoints statt Anzeigespalten). Antwort inhandleLspDefinition: gleiche Datei →jumpTo; andere Datei →openFileAs+lsp_goto, dasapplyLspGotoinupdate()ausführt, sobald der Tab aktiv und der Buffer geladen ist (max. 240 Frames); leeres Ergebnis → lokale Suche. - Gemessen (zls 0.15.1, Zig 0.15.2): erste Definition im frischen Projekt ~12 s (zls analysiert std), danach sofort. Hover/Completion sind im Client nicht angebunden (Methoden vorgesehen).
- E2E
python3 scripts/e2e_lsp.py(braucht zls): F12 aufa.helper()öffneta.zigmit Cursor aufhelper. Hinweis: der RPCopen_folderlädt nur den Explorer neu,current_directorybleibt das Startverzeichnis; zls bekommt im E2E deshalb das Projekt als Root.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |