code-yeongyu/oh-my-openagent / packages/shared-skills/skills/lsp-setup
lsp-setup
FlaggedConfigures a language server so editor/agent tooling (diagnostics, go-to-definition, references, rename) works. Use when a project needs an LSP installed or wired, or a 'no LSP server configured' error appears.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.1 KB |
| references/bash/README.md | markdown | 2.2 KB |
| references/c-cpp/README.md | markdown | 2.5 KB |
| references/csharp/README.md | markdown | 2.5 KB |
| references/dart/README.md | markdown | 1.9 KB |
| references/elixir/README.md | markdown | 2.2 KB |
| references/go/README.md | markdown | 2.0 KB |
| references/haskell/README.md | markdown | 2.3 KB |
| references/java/README.md | markdown | 2.7 KB |
| references/julia/README.md | markdown | 2.4 KB |
| references/kotlin/README.md | markdown | 2.6 KB |
| references/lua/README.md | markdown | 2.1 KB |
| references/php/README.md | markdown | 2.0 KB |
| references/python/README.md | markdown | 3.1 KB |
| references/ruby/README.md | markdown | 2.4 KB |
| references/rust/README.md | markdown | 2.0 KB |
| references/swift/README.md | markdown | 2.3 KB |
| references/terraform/README.md | markdown | 2.2 KB |
| references/typescript/README.md | markdown | 3.3 KB |
| references/yaml/README.md | markdown | 2.4 KB |
| references/zig/README.md | markdown | 1.8 KB |
| scripts/detect-lsp.ts | script | 6.8 KB |
| scripts/lsp-server-table.ts | script | 5.4 KB |
| scripts/tsconfig.json | config | 397 B |
| scripts/verify-lsp.ts | script | 5.2 KB |
references/typescript/README.md
View on GitHub# TypeScript / JavaScript — LSP setup
- **Builtin server:** `typescript` — `typescript-language-server --stdio`
- **Extensions:** `.ts .tsx .js .jsx .mjs .cjs .mts .cts`
- **Install hint:** `npm install -g typescript-language-server typescript`
## Install
- **macOS:** `npm install -g typescript-language-server typescript`
- **Linux:** `npm install -g typescript-language-server typescript`
- **Windows:** `npm install -g typescript-language-server typescript` (PowerShell or cmd)
`typescript-language-server` is only a thin wrapper — it needs the `typescript`
package (`tsserver`) present too, either globally or in the project's
`node_modules`. Always install both.
Confirm it resolves:
```bash
command -v typescript-language-server
```
## Configure
Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in every harness's project config (per-harness paths: the Configure step in `SKILL.md`):
```json
{ "lsp": { "typescript": { "priority": 100 } } }
```
For builtin ids in a PROJECT config, `command` is supplied automatically — only set `priority`/`initialization`/`extensions`/`disabled` (a project entry drops `env`). `env`, and a fully custom (non-builtin) server with its own `command`, must go in your harness's USER config (see the Configure step in `SKILL.md`).
### Initialization options (only if commonly needed)
None commonly required. To favor inlay hints or tweak preferences:
```json
{ "lsp": { "typescript": { "initialization": { "preferences": { "includeInlayParameterNameHints": "all" } } } } }
```
## Alternatives
All builtin — pick by toolchain. Raise the alternative's `priority` and/or
`disabled` the default so the file routes to your choice:
| id | command | when to choose |
| ------------ | ---------------------------------------- | --------------------------------------- |
| `deno` | `deno lsp` | Deno projects (handles `.ts/.tsx/.js`) |
| `biome` | `biome lsp-proxy --stdio` | Biome lint/format as the LSP |
| `eslint` | `vscode-eslint-language-server --stdio` | ESLint diagnostics (install below) |
| `oxlint` | `oxlint --lsp` | fast Oxc-based linting |
| `vue` | `vue-language-server --stdio` | `.vue` single-file components |
| `svelte` | `svelteserver --stdio` | `.svelte` files |
| `astro` | `astro-ls --stdio` | `.astro` files |
`eslint` install: `npm i -g vscode-langservers-extracted`.
Pick Deno or Biome over the default:
```json
{ "lsp": {
"typescript": { "disabled": true },
"deno": { "priority": 100 }
} }
```
(Swap `"deno"` for `"biome"` to use Biome instead.)
## Troubleshooting
- **PATH:** `typescript-language-server` must be on PATH; reopen shell after `npm i -g`. Your global bin is `$(npm prefix -g)/bin` (Windows: `npm prefix -g`); make sure it is on PATH.
- **Missing tsserver:** errors like "Could not find tsserver" mean the `typescript` package is absent — install it globally or in the project.
## Verify
```bash
bun ../../scripts/verify-lsp.ts path/to/file.ts
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 470k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |