litclaude-ai 0.3.3 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +5 -5
- package/README_ko-KR.md +5 -5
- package/RELEASE_CHECKLIST.md +8 -6
- package/cover.png +0 -0
- package/generate_cover.py +1 -1
- package/package.json +1 -1
- package/plugins/litclaude/.claude-plugin/plugin.json +1 -1
- package/plugins/litclaude/bin/litclaude-hook.js +34 -4
- package/plugins/litclaude/commands/dynamic-workflow.md +6 -6
- package/plugins/litclaude/commands/review-work.md +5 -5
- package/plugins/litclaude/hooks/hooks.json +12 -0
- package/plugins/litclaude/lib/litgoal/autoloop.mjs +78 -0
- package/plugins/litclaude/lib/litgoal/cli.mjs +8 -0
- package/plugins/litclaude/skills/lit-loop/SKILL.md +12 -10
- package/plugins/litclaude/skills/lit-plan/SKILL.md +9 -10
- package/plugins/litclaude/skills/litgoal/SKILL.md +41 -5
- package/plugins/litclaude/skills/lsp-setup/SKILL.md +151 -0
- package/plugins/litclaude/skills/lsp-setup/references/bash/README.md +63 -0
- package/plugins/litclaude/skills/lsp-setup/references/c-cpp/README.md +72 -0
- package/plugins/litclaude/skills/lsp-setup/references/csharp/README.md +81 -0
- package/plugins/litclaude/skills/lsp-setup/references/dart/README.md +53 -0
- package/plugins/litclaude/skills/lsp-setup/references/elixir/README.md +57 -0
- package/plugins/litclaude/skills/lsp-setup/references/go/README.md +59 -0
- package/plugins/litclaude/skills/lsp-setup/references/haskell/README.md +64 -0
- package/plugins/litclaude/skills/lsp-setup/references/java/README.md +66 -0
- package/plugins/litclaude/skills/lsp-setup/references/julia/README.md +62 -0
- package/plugins/litclaude/skills/lsp-setup/references/kotlin/README.md +68 -0
- package/plugins/litclaude/skills/lsp-setup/references/lua/README.md +64 -0
- package/plugins/litclaude/skills/lsp-setup/references/php/README.md +56 -0
- package/plugins/litclaude/skills/lsp-setup/references/python/README.md +68 -0
- package/plugins/litclaude/skills/lsp-setup/references/ruby/README.md +62 -0
- package/plugins/litclaude/skills/lsp-setup/references/rust/README.md +61 -0
- package/plugins/litclaude/skills/lsp-setup/references/swift/README.md +60 -0
- package/plugins/litclaude/skills/lsp-setup/references/terraform/README.md +61 -0
- package/plugins/litclaude/skills/lsp-setup/references/typescript/README.md +77 -0
- package/plugins/litclaude/skills/lsp-setup/references/yaml/README.md +60 -0
- package/plugins/litclaude/skills/lsp-setup/references/zig/README.md +55 -0
- package/plugins/litclaude/skills/lsp-setup/scripts/detect-lsp.ts +220 -0
- package/plugins/litclaude/skills/lsp-setup/scripts/lsp-server-table.ts +146 -0
- package/plugins/litclaude/skills/lsp-setup/scripts/tsconfig.json +18 -0
- package/plugins/litclaude/skills/lsp-setup/scripts/verify-lsp.ts +242 -0
- package/plugins/litclaude/skills/start-work/SKILL.md +12 -13
- package/plugins/litclaude/skills/visual-qa/SKILL.md +259 -0
- package/plugins/litclaude/skills/visual-qa/scripts/ansi.ts +17 -0
- package/plugins/litclaude/skills/visual-qa/scripts/cli.ts +96 -0
- package/plugins/litclaude/skills/visual-qa/scripts/east-asian-width.ts +72 -0
- package/plugins/litclaude/skills/visual-qa/scripts/image-diff.ts +109 -0
- package/plugins/litclaude/skills/visual-qa/scripts/png-crc.ts +27 -0
- package/plugins/litclaude/skills/visual-qa/scripts/png-decode.ts +206 -0
- package/plugins/litclaude/skills/visual-qa/scripts/png-synth.ts +57 -0
- package/plugins/litclaude/skills/visual-qa/scripts/tui-grid.ts +88 -0
- package/plugins/litclaude/skills/visual-qa/scripts/types.ts +54 -0
- package/scripts/qa-portable-install.sh +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lsp-setup
|
|
3
|
+
description: "Configure a Language Server (LSP) for a specific language so Claude Code tooling — diagnostics, go-to-definition, find-references, rename — works in LitClaude. Use when you need to set up or install a language server, fix 'no LSP server configured' / 'server not installed', choose between servers (basedpyright vs pyright vs ruff), or add a language to plugins/litclaude/.lsp.json. Routes by file extension to references/<language>/README.md for the server choice, per-OS install commands, the .lsp.json config snippet, and troubleshooting. Ships scripts: detect-lsp.ts (scan a project for languages + report each server's install/config status against .lsp.json) and verify-lsp.ts (real diagnostics roundtrip). Covers typescript, python, go, rust, c/c++, java, kotlin, c#/razor, swift, ruby, php, dart, elixir, zig, lua, bash, yaml, terraform, haskell, julia."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LSP Setup
|
|
7
|
+
|
|
8
|
+
Configure the right Language Server for a project so Claude Code's LSP tools
|
|
9
|
+
(`diagnostics`, `goto_definition`, `find_references`, `symbols`, `rename`)
|
|
10
|
+
actually work in LitClaude. This skill is an index: detect what a project needs,
|
|
11
|
+
install the server, declare it in `plugins/litclaude/.lsp.json`, then verify with
|
|
12
|
+
a real diagnostics roundtrip.
|
|
13
|
+
|
|
14
|
+
This is the multi-language configurator. For a quick post-edit diagnostics pass
|
|
15
|
+
on an already-configured language, use the lighter `lsp` skill instead — `lsp` is
|
|
16
|
+
the quick path, `lsp-setup` is the configurator that wires new languages in.
|
|
17
|
+
|
|
18
|
+
The recommended server per language is the source of truth in
|
|
19
|
+
`scripts/lsp-server-table.ts`; each `references/<language>/README.md` mirrors it.
|
|
20
|
+
|
|
21
|
+
## Runtime
|
|
22
|
+
|
|
23
|
+
The scripts are dependency-free TypeScript. Run them with either:
|
|
24
|
+
|
|
25
|
+
- **Node 22.6+:** `node --experimental-strip-types scripts/detect-lsp.ts <dir>`
|
|
26
|
+
- **Bun:** `bun scripts/detect-lsp.ts <dir>`
|
|
27
|
+
|
|
28
|
+
No `npm install` is required; the scripts import only Node built-ins and the
|
|
29
|
+
embedded `lsp-server-table.ts`.
|
|
30
|
+
|
|
31
|
+
## Phase 0 — Language Gate (run first)
|
|
32
|
+
|
|
33
|
+
Identify the language from the file extension, then read the matching reference
|
|
34
|
+
before installing or configuring anything.
|
|
35
|
+
|
|
36
|
+
| Extension(s) | Reference |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `.ts .tsx .js .jsx .mjs .cjs .mts .cts` | `references/typescript/README.md` |
|
|
39
|
+
| `.py .pyi` | `references/python/README.md` |
|
|
40
|
+
| `.go` | `references/go/README.md` |
|
|
41
|
+
| `.rs` | `references/rust/README.md` |
|
|
42
|
+
| `.c .cpp .cc .cxx .h .hpp .hh .hxx` | `references/c-cpp/README.md` |
|
|
43
|
+
| `.java` | `references/java/README.md` |
|
|
44
|
+
| `.kt .kts` | `references/kotlin/README.md` |
|
|
45
|
+
| `.cs .razor .cshtml` | `references/csharp/README.md` |
|
|
46
|
+
| `.swift` | `references/swift/README.md` |
|
|
47
|
+
| `.rb .rake .gemspec .ru` | `references/ruby/README.md` |
|
|
48
|
+
| `.php` | `references/php/README.md` |
|
|
49
|
+
| `.dart` | `references/dart/README.md` |
|
|
50
|
+
| `.ex .exs` | `references/elixir/README.md` |
|
|
51
|
+
| `.zig .zon` | `references/zig/README.md` |
|
|
52
|
+
| `.lua` | `references/lua/README.md` |
|
|
53
|
+
| `.sh .bash .zsh .ksh` | `references/bash/README.md` |
|
|
54
|
+
| `.yaml .yml` | `references/yaml/README.md` |
|
|
55
|
+
| `.tf .tfvars` | `references/terraform/README.md` |
|
|
56
|
+
| `.hs .lhs` | `references/haskell/README.md` |
|
|
57
|
+
| `.jl` | `references/julia/README.md` |
|
|
58
|
+
|
|
59
|
+
## Workflow — detect, install, configure, verify
|
|
60
|
+
|
|
61
|
+
### 1. Detect
|
|
62
|
+
|
|
63
|
+
Scan the project to see which languages are present and whether each server is
|
|
64
|
+
installed and already declared in `.lsp.json`:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node --experimental-strip-types scripts/detect-lsp.ts <projectDir>
|
|
68
|
+
node --experimental-strip-types scripts/detect-lsp.ts <projectDir> --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
For each detected language it prints the recommended server, the executable it
|
|
72
|
+
needs on `PATH`, whether that executable is installed, an install hint, and
|
|
73
|
+
whether `plugins/litclaude/.lsp.json` already declares the language. Use
|
|
74
|
+
`--config=<path>` to point at a different `.lsp.json` copy.
|
|
75
|
+
|
|
76
|
+
### 2. Install
|
|
77
|
+
|
|
78
|
+
Open `references/<language>/README.md` and run the install command for your OS,
|
|
79
|
+
then confirm the executable resolves:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
command -v <server-executable> # e.g. typescript-language-server, gopls, rust-analyzer
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 3. Configure (LitClaude `.lsp.json`)
|
|
86
|
+
|
|
87
|
+
LitClaude declares servers in `plugins/litclaude/.lsp.json`. The schema is keyed
|
|
88
|
+
by **language name**; each entry holds a `command` array and an
|
|
89
|
+
`extensionToLanguage` map that tells Claude Code which file extensions route to
|
|
90
|
+
that server:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"<language>": {
|
|
95
|
+
"command": ["<bin>", "<arg>"],
|
|
96
|
+
"extensionToLanguage": {
|
|
97
|
+
".ext": "<languageId>"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Rules:
|
|
104
|
+
|
|
105
|
+
- One entry per server, keyed by language name. The `command` is the full argv.
|
|
106
|
+
- `extensionToLanguage` maps each owned extension to the LSP `languageId`. Claude
|
|
107
|
+
Code resolves the server for an edited file by matching its extension here.
|
|
108
|
+
- The shipped default declares only `typescript`. Add a language by copying the
|
|
109
|
+
block from its reference README into `.lsp.json`.
|
|
110
|
+
- Server-specific tuning (schemas, licence keys, check commands) travels through
|
|
111
|
+
the editor's LSP `initializationOptions` or a project config file (for example
|
|
112
|
+
`.clangd`, `.rubocop.yml`, `pyrightconfig.json`), not through `.lsp.json`.
|
|
113
|
+
|
|
114
|
+
If a language also needs an MCP wiring (for example a server exposed through an
|
|
115
|
+
MCP stdio bridge rather than a direct binary), declare that bridge in `.mcp.json`
|
|
116
|
+
and keep `.lsp.json` pointed at the resulting command. Most servers here are
|
|
117
|
+
direct binaries and need only `.lsp.json`.
|
|
118
|
+
|
|
119
|
+
Each language reference gives a ready-to-paste `.lsp.json` snippet.
|
|
120
|
+
|
|
121
|
+
### 4. Verify
|
|
122
|
+
|
|
123
|
+
Run a real diagnostics roundtrip against a source file. The script resolves the
|
|
124
|
+
server for the file extension (from `.lsp.json` when present, else the embedded
|
|
125
|
+
table), spawns it, runs the JSON-RPC `initialize` -> `initialized` -> `didOpen`
|
|
126
|
+
handshake over stdio, waits for `textDocument/publishDiagnostics`, and reports:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
node --experimental-strip-types scripts/verify-lsp.ts <path/to/file.ext>
|
|
130
|
+
node --experimental-strip-types scripts/verify-lsp.ts <file> --timeout=90000
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`OK` = the server started and answered with diagnostics. `FAIL: language server
|
|
134
|
+
not installed` = go back to step 2. Other `FAIL` text carries the server or
|
|
135
|
+
timeout error. `SKIP` = no server is known for that extension; add one via the
|
|
136
|
+
reference and `.lsp.json`. Exit codes: 0 OK, 1 FAIL, 2 usage, 3 SKIP.
|
|
137
|
+
|
|
138
|
+
## Scripts
|
|
139
|
+
|
|
140
|
+
| Script | Purpose |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `scripts/detect-lsp.ts` | Scan a directory; per detected language report the recommended server, install status, install hint, and whether `.lsp.json` declares it. `--json` for machine output, `--config=<path>` to target a config. |
|
|
143
|
+
| `scripts/verify-lsp.ts` | Real LSP diagnostics roundtrip for one file over stdio JSON-RPC; `OK`/`FAIL`/`SKIP` + exit code 0/1/2/3. Dependency-free. |
|
|
144
|
+
| `scripts/lsp-server-table.ts` | Embedded snapshot of the recommended server per language, mirrored by the references. |
|
|
145
|
+
|
|
146
|
+
## When LSP tooling is unavailable
|
|
147
|
+
|
|
148
|
+
If Claude Code does not expose LSP tools and a server is not installed, do not
|
|
149
|
+
fabricate a passing diagnostics result. Fall back to the project's own commands
|
|
150
|
+
(`tsc --noEmit`, `ruff`, `cargo check`, `go test`, etc.), label the LSP gap as a
|
|
151
|
+
controlled skip, and report it — consistent with the `lsp` skill's failure rules.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Bash — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `bash-language-server start`
|
|
4
|
+
- **Extensions:** `.sh .bash .zsh .ksh`
|
|
5
|
+
- **Install hint:** `npm install -g bash-language-server`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `npm install -g bash-language-server`
|
|
10
|
+
- **Linux:** `npm install -g bash-language-server`
|
|
11
|
+
- **Windows:** `npm install -g bash-language-server` (PowerShell)
|
|
12
|
+
|
|
13
|
+
For real diagnostics, also install `shellcheck`:
|
|
14
|
+
|
|
15
|
+
- **macOS:** `brew install shellcheck`
|
|
16
|
+
- **Linux:** `apt install shellcheck` (or `dnf install ShellCheck`)
|
|
17
|
+
- **Windows:** `scoop install shellcheck`
|
|
18
|
+
|
|
19
|
+
Confirm it resolves:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
command -v bash-language-server
|
|
23
|
+
command -v shellcheck
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Configure
|
|
27
|
+
|
|
28
|
+
Add a `bash` entry to `plugins/litclaude/.lsp.json`:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"bash": {
|
|
33
|
+
"command": ["bash-language-server", "start"],
|
|
34
|
+
"extensionToLanguage": {
|
|
35
|
+
".sh": "shellscript",
|
|
36
|
+
".bash": "shellscript",
|
|
37
|
+
".zsh": "shellscript",
|
|
38
|
+
".ksh": "shellscript"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Claude Code routes these extensions to `bash-language-server` via the map.
|
|
45
|
+
`bash-language-server` discovers `shellcheck` on PATH automatically; to point at a
|
|
46
|
+
non-PATH binary, export `SHELLCHECK_PATH` in the launching shell.
|
|
47
|
+
|
|
48
|
+
## Alternatives
|
|
49
|
+
|
|
50
|
+
- `shellcheck` standalone as a linter-only flow (no LSP).
|
|
51
|
+
- `shfmt` for formatting (complements, does not replace, the LSP).
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
- **PATH:** `bash-language-server` on PATH; reopen shell after `npm -g` install.
|
|
55
|
+
- **No diagnostics:** `shellcheck` missing — diagnostics are powered by it; install and reopen.
|
|
56
|
+
- **Wrong shell dialect:** `.zsh`/`.ksh` are linted as bash; shellcheck may flag shell-specific syntax.
|
|
57
|
+
|
|
58
|
+
## Verify
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.sh
|
|
62
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.sh
|
|
63
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# C / C++ — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `clangd --background-index --clang-tidy`
|
|
4
|
+
- **Extensions:** `.c .cpp .cc .cxx .c++ .h .hpp .hh .hxx .h++`
|
|
5
|
+
- **Install hint:** `https://clangd.llvm.org/installation`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `brew install llvm` (clangd ships in the LLVM keg; add its `bin` to PATH)
|
|
10
|
+
- **Linux:** `apt install clangd` (Debian/Ubuntu); use your distro package elsewhere
|
|
11
|
+
- **Windows:** install LLVM from `https://releases.llvm.org` or `winget install LLVM.LLVM`
|
|
12
|
+
|
|
13
|
+
See `https://clangd.llvm.org/installation` for other platforms.
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v clangd
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `c-cpp` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"c-cpp": {
|
|
28
|
+
"command": ["clangd", "--background-index", "--clang-tidy"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".c": "c",
|
|
31
|
+
".h": "c",
|
|
32
|
+
".cpp": "cpp",
|
|
33
|
+
".cc": "cpp",
|
|
34
|
+
".cxx": "cpp",
|
|
35
|
+
".hpp": "cpp",
|
|
36
|
+
".hh": "cpp",
|
|
37
|
+
".hxx": "cpp"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Claude Code routes these extensions to `clangd` via the map. clangd reads
|
|
44
|
+
build flags from a project `.clangd` file, not from `.lsp.json`; the `command`
|
|
45
|
+
above already passes `--background-index --clang-tidy`.
|
|
46
|
+
|
|
47
|
+
## Compile commands
|
|
48
|
+
|
|
49
|
+
clangd needs a `compile_commands.json` at the project root (or in `build/`) for
|
|
50
|
+
accurate diagnostics and cross-file navigation. Generate it with:
|
|
51
|
+
|
|
52
|
+
- **CMake:** `cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` (symlink/copy `build/compile_commands.json` to the root)
|
|
53
|
+
- **Make / other:** `bear -- make`
|
|
54
|
+
|
|
55
|
+
Without it, clangd falls back to heuristic flags and reports spurious errors.
|
|
56
|
+
|
|
57
|
+
## Alternatives
|
|
58
|
+
|
|
59
|
+
`ccls` exists as a third-party server — set the `command` to `["ccls"]` in the
|
|
60
|
+
`c-cpp` entry if you prefer it.
|
|
61
|
+
|
|
62
|
+
## Troubleshooting
|
|
63
|
+
- **PATH:** `clangd` must be on PATH; reopen shell after install. Homebrew LLVM is keg-only — add `$(brew --prefix llvm)/bin` to PATH.
|
|
64
|
+
- **Spurious "file not found" / unknown flags:** missing or stale `compile_commands.json` — regenerate it after changing the build.
|
|
65
|
+
- **Header-only diagnostics wrong:** ensure the header's translation unit appears in the compile database, or add a `.clangd` `CompileFlags` block.
|
|
66
|
+
|
|
67
|
+
## Verify
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.cpp
|
|
71
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.cpp
|
|
72
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# C# — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `csharp-ls`
|
|
4
|
+
- **Extensions:** `.cs`
|
|
5
|
+
- **Install hint:** `dotnet tool install -g csharp-ls`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Requires the **.NET SDK**. Install the tool globally:
|
|
10
|
+
|
|
11
|
+
- **macOS:** `dotnet tool install -g csharp-ls`
|
|
12
|
+
- **Linux:** `dotnet tool install -g csharp-ls`
|
|
13
|
+
- **Windows:** `dotnet tool install -g csharp-ls`
|
|
14
|
+
|
|
15
|
+
Global .NET tools land in `~/.dotnet/tools` — ensure that directory is on PATH (Windows: `%USERPROFILE%\.dotnet\tools`).
|
|
16
|
+
|
|
17
|
+
Confirm it resolves:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v csharp-ls
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure
|
|
24
|
+
|
|
25
|
+
Add a `csharp` entry to `plugins/litclaude/.lsp.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"csharp": {
|
|
30
|
+
"command": ["csharp-ls"],
|
|
31
|
+
"extensionToLanguage": {
|
|
32
|
+
".cs": "csharp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Claude Code routes `.cs` edits to `csharp-ls` via the map. `csharp-ls` picks up
|
|
39
|
+
the nearest `.sln` or `.csproj`; keep the solution restorable (`dotnet restore`).
|
|
40
|
+
|
|
41
|
+
## Razor / Blazor
|
|
42
|
+
|
|
43
|
+
Razor and Blazor files use a separate server. Add a second entry:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"razor": {
|
|
48
|
+
"command": ["roslyn-language-server", "--stdio"],
|
|
49
|
+
"extensionToLanguage": {
|
|
50
|
+
".razor": "razor",
|
|
51
|
+
".cshtml": "razor"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Install it (requires **v5.8.0+**; see [dotnet/razor](https://github.com/dotnet/razor)):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
dotnet tool install -g roslyn-language-server --prerelease
|
|
61
|
+
command -v roslyn-language-server
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Alternatives
|
|
65
|
+
|
|
66
|
+
**OmniSharp** — legacy C# language server. Still works but is being superseded by
|
|
67
|
+
the Roslyn-based servers; prefer `csharp-ls` / `roslyn-language-server`.
|
|
68
|
+
|
|
69
|
+
## Troubleshooting
|
|
70
|
+
|
|
71
|
+
- **PATH:** `csharp-ls` / `roslyn-language-server` on PATH (`~/.dotnet/tools`); reopen shell after install.
|
|
72
|
+
- **No .NET SDK:** install the SDK (not just the runtime) before installing the tool.
|
|
73
|
+
- **No symbols:** run `dotnet restore`; an unrestored solution yields empty results.
|
|
74
|
+
- **Razor needs v5.8.0+:** older `roslyn-language-server` builds lack the `--stdio` Razor support — install with `--prerelease`.
|
|
75
|
+
|
|
76
|
+
## Verify
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/File.cs
|
|
80
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/File.cs
|
|
81
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Dart — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `dart language-server --lsp`
|
|
4
|
+
- **Extensions:** `.dart`
|
|
5
|
+
- **Install hint:** `Included with the Dart/Flutter SDK`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
The language server ships inside the Dart SDK (and the Flutter SDK, which bundles Dart). There is no separate package to install — just put `dart` (or `flutter`) on PATH.
|
|
10
|
+
|
|
11
|
+
- **macOS:** `brew install dart` (or install Flutter and use its bundled `dart`)
|
|
12
|
+
- **Linux:** install the Dart SDK from your package manager / `https://dart.dev/get-dart`, or install Flutter
|
|
13
|
+
- **Windows:** install the Dart SDK or Flutter SDK and add its `bin` to PATH
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v dart
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `dart` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"dart": {
|
|
28
|
+
"command": ["dart", "language-server", "--lsp"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".dart": "dart"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Claude Code routes `.dart` edits to the Dart language server via the map. No
|
|
37
|
+
extra configuration is normally required.
|
|
38
|
+
|
|
39
|
+
## Alternatives
|
|
40
|
+
|
|
41
|
+
None.
|
|
42
|
+
|
|
43
|
+
## Troubleshooting
|
|
44
|
+
- **PATH:** `dart` must be on PATH; reopen the shell after installing the SDK. Flutter users: ensure `<flutter>/bin/cache/dart-sdk/bin` or the Flutter `bin` is exported.
|
|
45
|
+
- **Flutter vs Dart:** if you only have Flutter installed, the bundled `dart` works — make sure Flutter's `bin` is on PATH rather than relying on a separate Dart install.
|
|
46
|
+
- **SDK out of date:** run `dart --version` / `flutter upgrade` if analysis behaves oddly on newer language features.
|
|
47
|
+
|
|
48
|
+
## Verify
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.dart
|
|
52
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.dart
|
|
53
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Elixir — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `elixir-ls`
|
|
4
|
+
- **Extensions:** `.ex .exs`
|
|
5
|
+
- **Install hint:** `https://github.com/elixir-lsp/elixir-ls`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
ElixirLS needs Erlang/OTP and Elixir installed first. Build the release from
|
|
10
|
+
`https://github.com/elixir-lsp/elixir-ls` and put the `elixir-ls` launcher script on PATH.
|
|
11
|
+
|
|
12
|
+
- **macOS:** `brew install elixir-ls` (Homebrew provides the launcher), or build the release manually
|
|
13
|
+
- **Linux:** clone elixir-ls, run `mix deps.get && mix compile && mix elixir_ls.release2 -o release`, then add `release/` to PATH
|
|
14
|
+
- **Windows:** build the release and add the `release` dir (use the `.bat` launcher) to PATH
|
|
15
|
+
|
|
16
|
+
Confirm it resolves:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
command -v elixir-ls
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configure
|
|
23
|
+
|
|
24
|
+
Add an `elixir` entry to `plugins/litclaude/.lsp.json`:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"elixir": {
|
|
29
|
+
"command": ["elixir-ls"],
|
|
30
|
+
"extensionToLanguage": {
|
|
31
|
+
".ex": "elixir",
|
|
32
|
+
".exs": "elixir"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Claude Code routes `.ex`/`.exs` edits to `elixir-ls` via the map. No extra
|
|
39
|
+
configuration is normally required.
|
|
40
|
+
|
|
41
|
+
## Alternatives
|
|
42
|
+
|
|
43
|
+
- **lexical**: set the `command` to `["lexical"]` — fast, modern alternative LSP.
|
|
44
|
+
- **next-ls**: set the `command` to `["nextls", "--stdio"]` — from the elixir-tools project.
|
|
45
|
+
|
|
46
|
+
## Troubleshooting
|
|
47
|
+
- **PATH:** `elixir-ls` must be on PATH; reopen the shell after install.
|
|
48
|
+
- **asdf users:** the launcher is a shim — after `asdf install`, run `asdf reshim elixir` so the `elixir-ls` shim resolves, and ensure the Erlang/Elixir versions match the build.
|
|
49
|
+
- **First start is slow:** ElixirLS compiles your deps on first run; initial diagnostics can take a while on large projects.
|
|
50
|
+
- **OTP mismatch:** build elixir-ls with the same Erlang/Elixir versions you use for the project to avoid bytecode errors.
|
|
51
|
+
|
|
52
|
+
## Verify
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.ex
|
|
56
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.ex
|
|
57
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Go — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `gopls`
|
|
4
|
+
- **Extensions:** `.go`
|
|
5
|
+
- **Install hint:** `go install golang.org/x/tools/gopls@latest`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `go install golang.org/x/tools/gopls@latest` (or `brew install gopls`)
|
|
10
|
+
- **Linux:** `go install golang.org/x/tools/gopls@latest`
|
|
11
|
+
- **Windows:** `go install golang.org/x/tools/gopls@latest`
|
|
12
|
+
|
|
13
|
+
Requires the Go toolchain. `go install` drops the binary in `$GOPATH/bin`
|
|
14
|
+
(default `~/go/bin`) — that directory must be on PATH.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
export PATH="$PATH:$(go env GOPATH)/bin"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Confirm it resolves:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
command -v gopls
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Configure
|
|
27
|
+
|
|
28
|
+
Add a `go` entry to `plugins/litclaude/.lsp.json`:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"go": {
|
|
33
|
+
"command": ["gopls"],
|
|
34
|
+
"extensionToLanguage": {
|
|
35
|
+
".go": "go"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Claude Code routes `.go` edits to `gopls` via the extension map. Analyses such as
|
|
42
|
+
`staticcheck` are configured in `gopls` settings (e.g. a workspace `settings.json`
|
|
43
|
+
consumed by your editor) rather than in `.lsp.json`.
|
|
44
|
+
|
|
45
|
+
## Alternatives
|
|
46
|
+
|
|
47
|
+
None — `gopls` is the official and de facto sole Go language server.
|
|
48
|
+
|
|
49
|
+
## Troubleshooting
|
|
50
|
+
- **PATH:** `gopls` must be on PATH; ensure `$(go env GOPATH)/bin` is exported, then reopen the shell.
|
|
51
|
+
- **No diagnostics / "no required module":** open the directory containing `go.mod` as the workspace root. Outside a module, gopls degrades. Run `go mod tidy` if dependencies are unresolved.
|
|
52
|
+
- **Stale toolchain:** reinstall with `go install golang.org/x/tools/gopls@latest` after upgrading Go.
|
|
53
|
+
|
|
54
|
+
## Verify
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.go
|
|
58
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.go
|
|
59
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Haskell — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `haskell-language-server-wrapper --lsp`
|
|
4
|
+
- **Extensions:** `.hs .lhs`
|
|
5
|
+
- **Install hint:** `ghcup install hls`
|
|
6
|
+
|
|
7
|
+
The `-wrapper` binary detects your project's GHC version and dispatches to the matching HLS build.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
- **macOS:** `ghcup install hls` (install ghcup via `brew install ghcup` or the official script)
|
|
12
|
+
- **Linux:** `ghcup install hls` (ghcup script from https://www.haskell.org/ghcup/)
|
|
13
|
+
- **Windows:** `ghcup install hls` (ghcup is installed via the Windows installer / PowerShell bootstrap)
|
|
14
|
+
|
|
15
|
+
HLS needs a working GHC plus Cabal and/or Stack. Install a matching toolchain first:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
ghcup install ghc
|
|
19
|
+
ghcup install cabal
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Confirm it resolves:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
command -v haskell-language-server-wrapper
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Configure
|
|
29
|
+
|
|
30
|
+
Add a `haskell` entry to `plugins/litclaude/.lsp.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"haskell": {
|
|
35
|
+
"command": ["haskell-language-server-wrapper", "--lsp"],
|
|
36
|
+
"extensionToLanguage": {
|
|
37
|
+
".hs": "haskell",
|
|
38
|
+
".lhs": "haskell"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Claude Code routes `.hs`/`.lhs` edits to the HLS wrapper via the map. Per-project
|
|
45
|
+
plugin/formatter settings normally live in a `hie.yaml` (cradle) and
|
|
46
|
+
`.haskell-language-server` files rather than `.lsp.json`.
|
|
47
|
+
|
|
48
|
+
## Alternatives
|
|
49
|
+
|
|
50
|
+
- `ghcide` (the core HLS engine, standalone) — largely superseded by HLS.
|
|
51
|
+
- `hlint` standalone for lint-only checks; `ormolu`/`fourmolu` for formatting.
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
- **PATH:** `haskell-language-server-wrapper` on PATH; reopen shell after `ghcup install`.
|
|
55
|
+
- **GHC mismatch:** the installed HLS must support your project's GHC version — run `ghcup install hls` for that GHC, or align GHC to a supported one.
|
|
56
|
+
- **No cradle:** multi-package repos may need a `hie.yaml`; generate one with `gen-hie > hie.yaml`.
|
|
57
|
+
- **Slow first load:** HLS compiles dependencies on first open; let it finish indexing.
|
|
58
|
+
|
|
59
|
+
## Verify
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.hs
|
|
63
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.hs
|
|
64
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Java — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `jdtls`
|
|
4
|
+
- **Extensions:** `.java`
|
|
5
|
+
- **Install hint:** `https://github.com/eclipse-jdtls/eclipse.jdt.ls`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `brew install jdtls`
|
|
10
|
+
- **Linux:** Download from [eclipse-jdtls/eclipse.jdt.ls](https://github.com/eclipse-jdtls/eclipse.jdt.ls) releases, extract, and wrap the launcher as `jdtls` on PATH (some distros package it as `jdtls`/`jdt-language-server`).
|
|
11
|
+
- **Windows:** Download the release archive and add the `jdtls` launcher (`bin/jdtls.bat` or the Python wrapper) to PATH.
|
|
12
|
+
|
|
13
|
+
Requires a **JDK 17+** to run the language server itself (the project may target an older Java version).
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v jdtls
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `java` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"java": {
|
|
28
|
+
"command": ["jdtls"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".java": "java"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Claude Code routes `.java` edits to `jdtls` via the extension map. jdtls maintains
|
|
37
|
+
a per-project workspace data directory and the first index is slow (it resolves
|
|
38
|
+
the full classpath and builds). If `jdtls` cannot find a runtime, export
|
|
39
|
+
`JAVA_HOME` for a JDK 17+ in the shell that launches Claude Code:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Most settings (runtimes, format, import order) come from `settings.java.*`
|
|
46
|
+
defaults and work for Maven/Gradle projects with a standard layout.
|
|
47
|
+
|
|
48
|
+
## Alternatives
|
|
49
|
+
|
|
50
|
+
**No mainstream alternative.** `jdtls` (Eclipse JDT Language Server) is the
|
|
51
|
+
de-facto standard and powers the official VS Code Java extension.
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
- **PATH:** `jdtls` on PATH; reopen shell after install.
|
|
56
|
+
- **No JDK found:** server exits immediately — set `JAVA_HOME` to a JDK 17+.
|
|
57
|
+
- **Slow / no completions at first:** the initial classpath index can take a minute or more on large Maven/Gradle projects; wait for it to finish.
|
|
58
|
+
- **Stale state:** delete the jdtls workspace data dir to force a clean re-index if results go wrong after big dependency changes.
|
|
59
|
+
- **Build tool required:** keep `pom.xml` / `build.gradle` valid; a broken build descriptor breaks symbol resolution.
|
|
60
|
+
|
|
61
|
+
## Verify
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/File.java
|
|
65
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/File.java
|
|
66
|
+
```
|