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,62 @@
|
|
|
1
|
+
# Julia — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `julia --startup-file=no --history-file=no -e "using LanguageServer; runserver()"`
|
|
4
|
+
- **Extensions:** `.jl`
|
|
5
|
+
- **Install hint:** `julia -e 'using Pkg; Pkg.add("LanguageServer")'`
|
|
6
|
+
|
|
7
|
+
The PATH executable is `julia`; LanguageServer.jl is launched through the `-e` snippet, not as its own binary.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Install Julia (juliaup recommended), then add the `LanguageServer` package:
|
|
12
|
+
|
|
13
|
+
- **macOS:** `brew install juliaup && juliaup add release`
|
|
14
|
+
- **Linux:** `curl -fsSL https://install.julialang.org | sh` (installs juliaup)
|
|
15
|
+
- **Windows:** `winget install julia -s msstore` (installs juliaup)
|
|
16
|
+
|
|
17
|
+
Then add the package — ideally into a shared `@lsp` environment so it is not tied to one project:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
julia --project=@lsp -e 'using Pkg; Pkg.add("LanguageServer")'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Confirm Julia resolves (the LSP binary IS `julia`):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
command -v julia
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configure
|
|
30
|
+
|
|
31
|
+
Add a `julia` entry to `plugins/litclaude/.lsp.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"julia": {
|
|
36
|
+
"command": ["julia", "--startup-file=no", "--history-file=no", "-e", "using LanguageServer; runserver()"],
|
|
37
|
+
"extensionToLanguage": {
|
|
38
|
+
".jl": "julia"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Claude Code routes `.jl` edits to the Julia language server via the map. To pin
|
|
45
|
+
which environment hosts LanguageServer.jl, export `JULIA_PROJECT=@lsp` in the
|
|
46
|
+
shell that launches Claude Code.
|
|
47
|
+
|
|
48
|
+
## Alternatives
|
|
49
|
+
|
|
50
|
+
- The VS Code Julia extension bundles the same LanguageServer.jl server.
|
|
51
|
+
|
|
52
|
+
## Troubleshooting
|
|
53
|
+
- **PATH:** `julia` on PATH (not a `julials` binary); reopen shell after juliaup install.
|
|
54
|
+
- **First run precompiles — be patient:** the initial launch compiles LanguageServer.jl and may take minutes with no output; do not kill it. Subsequent starts are fast.
|
|
55
|
+
- **Package not found:** `LanguageServer` must be installed in the environment the server runs in (e.g. `@lsp`); add it there and set `JULIA_PROJECT`.
|
|
56
|
+
|
|
57
|
+
## Verify
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.jl
|
|
61
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.jl
|
|
62
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Kotlin — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `kotlin-lsp`
|
|
4
|
+
- **Extensions:** `.kt .kts`
|
|
5
|
+
- **Install hint:** `https://github.com/Kotlin/kotlin-lsp`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
The official **JetBrains Kotlin LSP** is pre-release. Download a build from the [Kotlin/kotlin-lsp](https://github.com/Kotlin/kotlin-lsp) releases and put the `kotlin-lsp` launcher on PATH.
|
|
10
|
+
|
|
11
|
+
- **macOS:** Download the release archive, extract, then symlink the launcher: `ln -s /path/to/kotlin-lsp/kotlin-lsp.sh /usr/local/bin/kotlin-lsp`
|
|
12
|
+
- **Linux:** Same as macOS — extract the release and place/symlink `kotlin-lsp` on PATH.
|
|
13
|
+
- **Windows:** Extract the release and add the directory containing `kotlin-lsp.bat` to PATH (invoke as `kotlin-lsp`).
|
|
14
|
+
|
|
15
|
+
Requires a **JDK** on the machine to run the server.
|
|
16
|
+
|
|
17
|
+
Confirm it resolves:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v kotlin-lsp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure
|
|
24
|
+
|
|
25
|
+
Add a `kotlin` entry to `plugins/litclaude/.lsp.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"kotlin": {
|
|
30
|
+
"command": ["kotlin-lsp"],
|
|
31
|
+
"extensionToLanguage": {
|
|
32
|
+
".kt": "kotlin",
|
|
33
|
+
".kts": "kotlin"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Claude Code routes `.kt`/`.kts` edits to `kotlin-lsp` via the map. If the server
|
|
40
|
+
cannot find a Java runtime, export `JAVA_HOME` in the launching shell:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The server resolves classpath from Gradle/Maven; keep the build descriptor
|
|
47
|
+
importable.
|
|
48
|
+
|
|
49
|
+
## Alternatives
|
|
50
|
+
|
|
51
|
+
**`fwcd/kotlin-language-server`** — older community server. Still usable but less
|
|
52
|
+
actively maintained than the official JetBrains one; set the `command` to its
|
|
53
|
+
launcher if you prefer it.
|
|
54
|
+
|
|
55
|
+
## Troubleshooting
|
|
56
|
+
|
|
57
|
+
- **PATH:** `kotlin-lsp` on PATH; reopen shell after install.
|
|
58
|
+
- **Pre-release churn:** the JetBrains server is early; pin a known-good release and expect occasional breakage.
|
|
59
|
+
- **No JDK:** server fails to start — install a JDK and/or set `JAVA_HOME`.
|
|
60
|
+
- **Slow first import:** Gradle resolution on first open can be slow on large projects; let it complete.
|
|
61
|
+
- **`.kts` scripts:** build/script files resolve more slowly than `.kt` sources; this is expected.
|
|
62
|
+
|
|
63
|
+
## Verify
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/File.kt
|
|
67
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/File.kt
|
|
68
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Lua — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `lua-language-server`
|
|
4
|
+
- **Extensions:** `.lua`
|
|
5
|
+
- **Install hint:** `https://github.com/LuaLS/lua-language-server`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
See `https://github.com/LuaLS/lua-language-server`.
|
|
10
|
+
|
|
11
|
+
- **macOS:** `brew install lua-language-server`
|
|
12
|
+
- **Linux:** download a release from GitHub, or `pacman -S lua-language-server` (Arch) / AUR
|
|
13
|
+
- **Windows:** download a release from the GitHub releases page and add its `bin` to PATH
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v lua-language-server
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `lua` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"lua": {
|
|
28
|
+
"command": ["lua-language-server"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".lua": "lua"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Claude Code routes `.lua` edits to `lua-language-server` via the map. Deeper
|
|
37
|
+
behavior (Neovim runtime libraries, the Lua runtime version, allowed globals)
|
|
38
|
+
is configured through a project `.luarc.json` rather than `.lsp.json`. For
|
|
39
|
+
Neovim config work, a `.luarc.json` like the following resolves `vim` globals and
|
|
40
|
+
the stdlib:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"runtime": { "version": "LuaJIT" },
|
|
45
|
+
"workspace": { "library": ["/usr/share/nvim/runtime/lua"] },
|
|
46
|
+
"diagnostics": { "globals": ["vim"] }
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Alternatives
|
|
51
|
+
|
|
52
|
+
None.
|
|
53
|
+
|
|
54
|
+
## Troubleshooting
|
|
55
|
+
- **PATH:** `lua-language-server` must be on PATH; reopen the shell after install.
|
|
56
|
+
- **Undefined `vim` global:** add `vim` to `diagnostics.globals` and set `workspace.library` in `.luarc.json` (see above) for Neovim work.
|
|
57
|
+
- **Wrong runtime version:** set `runtime.version` (`LuaJIT`, `Lua 5.4`, etc.) to match your interpreter, or stdlib functions report as undefined.
|
|
58
|
+
|
|
59
|
+
## Verify
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.lua
|
|
63
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.lua
|
|
64
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# PHP — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `intelephense --stdio`
|
|
4
|
+
- **Extensions:** `.php`
|
|
5
|
+
- **Install hint:** `npm install -g intelephense`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Intelephense is a Node package, so Node.js (and npm) must be installed first.
|
|
10
|
+
|
|
11
|
+
- **macOS:** `npm install -g intelephense`
|
|
12
|
+
- **Linux:** `npm install -g intelephense`
|
|
13
|
+
- **Windows:** `npm install -g intelephense`
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v intelephense
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `php` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"php": {
|
|
28
|
+
"command": ["intelephense", "--stdio"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".php": "php"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Claude Code routes `.php` edits to `intelephense` via the map. Intelephense's
|
|
37
|
+
premium features (rename, find-all-implementations, etc.) require a licence key,
|
|
38
|
+
which is passed through the editor's LSP `initializationOptions` rather than
|
|
39
|
+
`.lsp.json`. Without a key the server runs fine in free mode.
|
|
40
|
+
|
|
41
|
+
## Alternatives
|
|
42
|
+
|
|
43
|
+
**phpactor** — pure-PHP, no Node dependency. Set the `command` to
|
|
44
|
+
`["phpactor", "language-server"]`.
|
|
45
|
+
|
|
46
|
+
## Troubleshooting
|
|
47
|
+
- **PATH:** `intelephense` must be on PATH; reopen the shell after a global npm install. If missing, check `npm bin -g` is on PATH.
|
|
48
|
+
- **No Node:** Intelephense fails to start without Node.js. Install Node, then reinstall.
|
|
49
|
+
- **Wrong PHP version inference:** set `intelephense.environment.phpVersion` (via your editor's init options) to match your project.
|
|
50
|
+
|
|
51
|
+
## Verify
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.php
|
|
55
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.php
|
|
56
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Python — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `basedpyright-langserver --stdio`
|
|
4
|
+
- **Extensions:** `.py .pyi`
|
|
5
|
+
- **Install hint:** `pip install basedpyright`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `pip install basedpyright` (or `uv tool install basedpyright`)
|
|
10
|
+
- **Linux:** `pip install basedpyright` (or `uv tool install basedpyright`)
|
|
11
|
+
- **Windows:** `pip install basedpyright`
|
|
12
|
+
|
|
13
|
+
Prefer `uv tool install basedpyright` when the project uses uv — it keeps the
|
|
14
|
+
server isolated from project venvs and always on PATH.
|
|
15
|
+
|
|
16
|
+
Confirm it resolves:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
command -v basedpyright-langserver
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configure
|
|
23
|
+
|
|
24
|
+
Add a `python` entry to `plugins/litclaude/.lsp.json`. LitClaude keys each entry
|
|
25
|
+
by language name with a `command` array and an `extensionToLanguage` map:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"python": {
|
|
30
|
+
"command": ["basedpyright-langserver", "--stdio"],
|
|
31
|
+
"extensionToLanguage": {
|
|
32
|
+
".py": "python",
|
|
33
|
+
".pyi": "python"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Claude Code routes `.py`/`.pyi` edits to this server via the extension map.
|
|
40
|
+
Type-check strictness lives in `pyrightconfig.json` or `[tool.basedpyright]` in
|
|
41
|
+
`pyproject.toml`, not in `.lsp.json`.
|
|
42
|
+
|
|
43
|
+
## Choosing a server
|
|
44
|
+
|
|
45
|
+
Type checkers and the linter serve different roles. Run a type server, and
|
|
46
|
+
optionally `ruff` ALONGSIDE it (not instead). Set the `command` accordingly:
|
|
47
|
+
|
|
48
|
+
| command | install | role |
|
|
49
|
+
| ------------------------------------ | ---------------------- | --------------------------------------- |
|
|
50
|
+
| `["basedpyright-langserver", "--stdio"]` | `pip install basedpyright` | strictest types, **default** |
|
|
51
|
+
| `["pyright-langserver", "--stdio"]` | `pip install pyright` | upstream Microsoft type checker |
|
|
52
|
+
| `["ty", "server"]` | `pip install ty` | Astral, very fast, pre-1.0/experimental |
|
|
53
|
+
| `["ruff", "server"]` | `pip install ruff` | lint + format only, complements a type server |
|
|
54
|
+
|
|
55
|
+
Recommended: keep `basedpyright` as the `python` entry. `ruff` does not
|
|
56
|
+
type-check, so if you want lint diagnostics too run it as a separate tool rather
|
|
57
|
+
than replacing the type server.
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
- **PATH:** `basedpyright-langserver` must be on PATH; reopen shell after install. `uv tool install` writes to `~/.local/bin`.
|
|
61
|
+
- **Wrong interpreter / missing imports:** the server must see the project venv. Set `python.pythonPath` / `venvPath` in `pyrightconfig.json`, or activate the venv before launching.
|
|
62
|
+
|
|
63
|
+
## Verify
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.py
|
|
67
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.py
|
|
68
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Ruby — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `rubocop --lsp`
|
|
4
|
+
- **Extensions:** `.rb .rake .gemspec .ru`
|
|
5
|
+
- **Install hint:** `gem install rubocop`
|
|
6
|
+
|
|
7
|
+
> **Note:** the executable invoked is **`rubocop`** (`rubocop --lsp`). RuboCop must be installed: `gem install rubocop`.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
- **macOS:** `gem install rubocop`
|
|
12
|
+
- **Linux:** `gem install rubocop`
|
|
13
|
+
- **Windows:** `gem install rubocop`
|
|
14
|
+
|
|
15
|
+
In a Bundler project, prefer adding `rubocop` to the `Gemfile` and running via `bundle exec`.
|
|
16
|
+
|
|
17
|
+
Confirm it resolves (check `rubocop`, since that is what runs):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v rubocop
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure
|
|
24
|
+
|
|
25
|
+
Add a `ruby` entry to `plugins/litclaude/.lsp.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"ruby": {
|
|
30
|
+
"command": ["rubocop", "--lsp"],
|
|
31
|
+
"extensionToLanguage": {
|
|
32
|
+
".rb": "ruby",
|
|
33
|
+
".rake": "ruby",
|
|
34
|
+
".gemspec": "ruby",
|
|
35
|
+
".ru": "ruby"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Claude Code routes these extensions to `rubocop --lsp` via the map. Behavior is
|
|
42
|
+
driven by your `.rubocop.yml`; the server surfaces RuboCop diagnostics,
|
|
43
|
+
formatting, and code actions over LSP.
|
|
44
|
+
|
|
45
|
+
## Alternatives
|
|
46
|
+
|
|
47
|
+
- **Shopify `ruby-lsp`** — the standalone `ruby-lsp` executable, richer navigation than RuboCop alone. Set the `command` to `["ruby-lsp"]`.
|
|
48
|
+
- **`solargraph`** — older completion/type server; install with `gem install solargraph`, set the `command` to `["solargraph", "stdio"]`.
|
|
49
|
+
|
|
50
|
+
## Troubleshooting
|
|
51
|
+
|
|
52
|
+
- **PATH:** `rubocop` on PATH (that is the invoked binary); reopen shell after install.
|
|
53
|
+
- **`rubocop` not found:** install RuboCop with `gem install rubocop`.
|
|
54
|
+
- **Bundler mismatch:** if the project pins RuboCop in its `Gemfile`, run inside the bundle so versions match.
|
|
55
|
+
- **No diagnostics:** check `.rubocop.yml` is valid and not disabling everything.
|
|
56
|
+
|
|
57
|
+
## Verify
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.rb
|
|
61
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.rb
|
|
62
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Rust — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `rust-analyzer`
|
|
4
|
+
- **Extensions:** `.rs`
|
|
5
|
+
- **Install hint:** `rustup component add rust-analyzer`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `rustup component add rust-analyzer` (or `brew install rust-analyzer`)
|
|
10
|
+
- **Linux:** `rustup component add rust-analyzer`
|
|
11
|
+
- **Windows:** `rustup component add rust-analyzer`
|
|
12
|
+
|
|
13
|
+
The rustup component is the recommended path — it stays pinned to your toolchain.
|
|
14
|
+
`rust-analyzer` also needs the `rust-src` component to index the standard library
|
|
15
|
+
(`rustup component add rust-src`).
|
|
16
|
+
|
|
17
|
+
Confirm it resolves:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v rust-analyzer
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure
|
|
24
|
+
|
|
25
|
+
Add a `rust` entry to `plugins/litclaude/.lsp.json`:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"rust": {
|
|
30
|
+
"command": ["rust-analyzer"],
|
|
31
|
+
"extensionToLanguage": {
|
|
32
|
+
".rs": "rust"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Claude Code routes `.rs` edits to `rust-analyzer` via the extension map. Options
|
|
39
|
+
such as switching the check command to clippy live in `rust-analyzer` settings
|
|
40
|
+
consumed by your editor, not in `.lsp.json`.
|
|
41
|
+
|
|
42
|
+
## Alternatives
|
|
43
|
+
|
|
44
|
+
None — `rust-analyzer` is the official and sole Rust language server.
|
|
45
|
+
|
|
46
|
+
## Troubleshooting
|
|
47
|
+
- **PATH:** `rust-analyzer` must be on PATH; reopen shell after install. The rustup shim lives in `~/.cargo/bin`.
|
|
48
|
+
- **Exits while loading rust-src:** if rust-analyzer crashes during stdlib indexing, reinstall the source component:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
rustup component remove rust-src && rustup component add rust-src
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- **No proc-macro / build script support:** ensure the project builds with `cargo check`; rust-analyzer reuses the same toolchain.
|
|
55
|
+
|
|
56
|
+
## Verify
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.rs
|
|
60
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.rs
|
|
61
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Swift — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `sourcekit-lsp`
|
|
4
|
+
- **Extensions:** `.swift .objc .objcpp`
|
|
5
|
+
- **Install hint:** `Included with Xcode or the Swift toolchain`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
`sourcekit-lsp` ships with the Swift toolchain — no separate install.
|
|
10
|
+
|
|
11
|
+
- **macOS:** `xcode-select --install` (or install full Xcode). It resolves to the active toolchain selected by `xcode-select`.
|
|
12
|
+
- **Linux:** Install a swift.org toolchain (`sourcekit-lsp` ships inside it); add the toolchain's `usr/bin` to PATH.
|
|
13
|
+
- **Windows:** Install the swift.org Windows toolchain; `sourcekit-lsp` is bundled.
|
|
14
|
+
|
|
15
|
+
Confirm it resolves:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v sourcekit-lsp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Configure
|
|
22
|
+
|
|
23
|
+
Add a `swift` entry to `plugins/litclaude/.lsp.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"swift": {
|
|
28
|
+
"command": ["sourcekit-lsp"],
|
|
29
|
+
"extensionToLanguage": {
|
|
30
|
+
".swift": "swift",
|
|
31
|
+
".objc": "objective-c",
|
|
32
|
+
".objcpp": "objective-cpp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Claude Code routes these extensions to `sourcekit-lsp` via the map. For best
|
|
39
|
+
results the project needs a **SwiftPM `Package.swift`** or a
|
|
40
|
+
`compile_commands.json` compilation database so the server can resolve modules.
|
|
41
|
+
|
|
42
|
+
## Alternatives
|
|
43
|
+
|
|
44
|
+
**No mainstream alternative.** `sourcekit-lsp` is the official Apple/swift.org
|
|
45
|
+
server and the only practical choice.
|
|
46
|
+
|
|
47
|
+
## Troubleshooting
|
|
48
|
+
|
|
49
|
+
- **PATH:** `sourcekit-lsp` on PATH; reopen shell after install (or after `xcode-select -s`).
|
|
50
|
+
- **Wrong toolchain (macOS):** point `xcode-select` at the right Xcode/toolchain; mismatches cause stale or missing results.
|
|
51
|
+
- **No `Package.swift` / compile db:** add a SwiftPM manifest or generate `compile_commands.json` for accurate indexing.
|
|
52
|
+
- **Objective-C (`.objc`/`.objcpp`):** needs a compilation database to resolve headers and frameworks.
|
|
53
|
+
- **First build slow:** the server builds the module graph on first open; wait for it.
|
|
54
|
+
|
|
55
|
+
## Verify
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/File.swift
|
|
59
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/File.swift
|
|
60
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Terraform — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `terraform-ls serve`
|
|
4
|
+
- **Extensions:** `.tf .tfvars`
|
|
5
|
+
- **Install hint:** See https://github.com/hashicorp/terraform-ls
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `brew install hashicorp/tap/terraform-ls`
|
|
10
|
+
- **Linux:** download a release from https://github.com/hashicorp/terraform-ls/releases and place `terraform-ls` on PATH (or `apt`/`dnf` via the HashiCorp repo)
|
|
11
|
+
- **Windows:** `choco install terraform-ls` (or download a release zip)
|
|
12
|
+
|
|
13
|
+
`terraform-ls` requires the `terraform` binary itself to be installed and on PATH.
|
|
14
|
+
|
|
15
|
+
Confirm both resolve:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
command -v terraform-ls
|
|
19
|
+
command -v terraform
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configure
|
|
23
|
+
|
|
24
|
+
Add a `terraform` entry to `plugins/litclaude/.lsp.json`:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"terraform": {
|
|
29
|
+
"command": ["terraform-ls", "serve"],
|
|
30
|
+
"extensionToLanguage": {
|
|
31
|
+
".tf": "terraform",
|
|
32
|
+
".tfvars": "terraform-vars"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Claude Code routes `.tf`/`.tfvars` edits to `terraform-ls` via the map.
|
|
39
|
+
Provider/module completion comes from schemas generated by `terraform init`; run
|
|
40
|
+
it in each module root before expecting full completion:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
terraform init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Alternatives
|
|
47
|
+
|
|
48
|
+
- `tflint` standalone for opinionated linting (complements the LSP).
|
|
49
|
+
- `terraform fmt` for formatting.
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
- **PATH:** `terraform-ls` AND `terraform` both on PATH; reopen shell after install.
|
|
53
|
+
- **No provider completion:** run `terraform init` so the `.terraform/` schema cache exists.
|
|
54
|
+
- **`.tfvars` not analyzed:** open the containing module so the server has root context.
|
|
55
|
+
|
|
56
|
+
## Verify
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.tf
|
|
60
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.tf
|
|
61
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# TypeScript / JavaScript — LSP setup (Claude Code / LitClaude)
|
|
2
|
+
|
|
3
|
+
- **Recommended server:** `typescript-language-server --stdio`
|
|
4
|
+
- **Extensions:** `.ts .tsx .js .jsx .mjs .cjs .mts .cts`
|
|
5
|
+
- **Install hint:** `npm install -g typescript-language-server typescript`
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
- **macOS:** `npm install -g typescript-language-server typescript`
|
|
10
|
+
- **Linux:** `npm install -g typescript-language-server typescript`
|
|
11
|
+
- **Windows:** `npm install -g typescript-language-server typescript` (PowerShell or cmd)
|
|
12
|
+
|
|
13
|
+
`typescript-language-server` is only a thin wrapper — it needs the `typescript`
|
|
14
|
+
package (`tsserver`) present too, either globally or in the project's
|
|
15
|
+
`node_modules`. Always install both.
|
|
16
|
+
|
|
17
|
+
Confirm it resolves:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
command -v typescript-language-server
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure
|
|
24
|
+
|
|
25
|
+
LitClaude declares language servers in `plugins/litclaude/.lsp.json`. Each entry
|
|
26
|
+
is keyed by language name and holds a `command` array plus an
|
|
27
|
+
`extensionToLanguage` map. TypeScript/JavaScript already ships in the default
|
|
28
|
+
config:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"typescript": {
|
|
33
|
+
"command": ["typescript-language-server", "--stdio"],
|
|
34
|
+
"extensionToLanguage": {
|
|
35
|
+
".ts": "typescript",
|
|
36
|
+
".tsx": "typescriptreact",
|
|
37
|
+
".js": "javascript",
|
|
38
|
+
".jsx": "javascriptreact",
|
|
39
|
+
".mjs": "javascript",
|
|
40
|
+
".cjs": "javascript"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Add `.mts`/`.cts` to `extensionToLanguage` if your project uses them. Claude Code
|
|
47
|
+
resolves the server for an edited file by matching its extension against these
|
|
48
|
+
maps.
|
|
49
|
+
|
|
50
|
+
## Alternatives
|
|
51
|
+
|
|
52
|
+
Swap the `command` for your toolchain. Keep the same `.lsp.json` shape and adjust
|
|
53
|
+
`extensionToLanguage` to cover the extensions that server should own:
|
|
54
|
+
|
|
55
|
+
| command | when to choose |
|
|
56
|
+
| ----------------------------------------- | --------------------------------------- |
|
|
57
|
+
| `["deno", "lsp"]` | Deno projects (handles `.ts/.tsx/.js`) |
|
|
58
|
+
| `["biome", "lsp-proxy", "--stdio"]` | Biome lint/format as the LSP |
|
|
59
|
+
| `["vscode-eslint-language-server", "--stdio"]` | ESLint diagnostics |
|
|
60
|
+
| `["oxlint", "--lsp"]` | fast Oxc-based linting |
|
|
61
|
+
| `["vue-language-server", "--stdio"]` | `.vue` single-file components |
|
|
62
|
+
| `["svelteserver", "--stdio"]` | `.svelte` files |
|
|
63
|
+
| `["astro-ls", "--stdio"]` | `.astro` files |
|
|
64
|
+
|
|
65
|
+
`eslint` install: `npm i -g vscode-langservers-extracted`. To run Deno instead
|
|
66
|
+
of the default, replace the `typescript` entry's `command` with `["deno", "lsp"]`.
|
|
67
|
+
|
|
68
|
+
## Troubleshooting
|
|
69
|
+
- **PATH:** `typescript-language-server` must be on PATH; reopen shell after `npm i -g`. Check your global bin with `npm bin -g`.
|
|
70
|
+
- **Missing tsserver:** errors like "Could not find tsserver" mean the `typescript` package is absent — install it globally or in the project.
|
|
71
|
+
|
|
72
|
+
## Verify
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node --experimental-strip-types ../../scripts/verify-lsp.ts path/to/file.ts
|
|
76
|
+
# or: bun ../../scripts/verify-lsp.ts path/to/file.ts
|
|
77
|
+
```
|