lsp-setup
Fungsinya
Tool ini membantu menyiapkan 'language server' yang tepat untuk proyek pemrograman Anda. Dengan begitu, fitur seperti mencari error, pindah ke definisi kode, dan mengganti nama fungsi dapat berjalan dengan baik.
Kapan dipakai
- βKetika Anda mendapat error yang menyatakan 'no LSP server configured'.
- βKetika Anda ingin alat bantu kode (seperti pencarian error) berfungsi di proyek Anda.
- βKetika memulai proyek baru dengan bahasa pemrograman yang didukung.
Link skill
https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/lsp-setup/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βSiapkan language server untuk proyek Python saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini pertama-tama mengidentifikasi bahasa pemrograman proyek Anda. Setelah itu, tool ini memasang language server yang diperlukan dan mengatur alat bantunya agar fitur-fiturnya berfungsi dengan benar.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
LSP Setup
Configure the right Language Server for a project so the lsp MCP tools
(diagnostics, goto_definition, find_references, symbols, rename)
actually work. This skill is an index: detect what a project needs, install the
server, write the config, then verify with a real roundtrip.
The list of servers we ship as builtin is the source of truth in
packages/lsp-tools-mcp/src/lsp/server-definitions.ts (BUILTIN_SERVERS +
LSP_INSTALL_HINTS). The per-language references below mirror it.
PHASE 0 β LANGUAGE GATE (run first)
Identify the language from the file extension, then read the matching reference before installing or configuring anything.
| Extension(s) | Reference |
|---|---|
.ts .tsx .js .jsx .mjs .cjs .mts .cts .vue .svelte .astro |
references/typescript/README.md |
.py .pyi |
references/python/README.md |
.go |
references/go/README.md |
.rs |
references/rust/README.md |
.c .cpp .cc .cxx .h .hpp .hh .hxx |
references/c-cpp/README.md |
.java |
references/java/README.md |
.kt .kts |
references/kotlin/README.md |
.cs .razor .cshtml |
references/csharp/README.md |
.swift |
references/swift/README.md |
.rb .rake .gemspec .ru |
references/ruby/README.md |
.php |
references/php/README.md |
.dart |
references/dart/README.md |
.ex .exs |
references/elixir/README.md |
.zig .zon |
references/zig/README.md |
.lua |
references/lua/README.md |
.sh .bash .zsh .ksh |
references/bash/README.md |
.yaml .yml |
references/yaml/README.md |
.tf .tfvars |
references/terraform/README.md |
.hs .lhs |
references/haskell/README.md |
.jl |
references/julia/README.md |
WORKFLOW β detect β install β configure β verify
1. Detect
Scan the project to see which languages are present and whether each server is installed and configured:
bun scripts/detect-lsp.ts <projectDir> # human report (default: cwd)
bun scripts/detect-lsp.ts <projectDir> --json
For each detected language it prints the builtin server id, the executable it
needs on PATH, whether that executable is installed, an install hint, and
whether a project config file already references it.
2. Install
Open references/<language>/README.md and run the install command for your OS.
Then confirm the executable resolves:
command -v <server-executable> # e.g. typescript-language-server, gopls, rust-analyzer
3. Configure
Most builtin servers need no config β they are resolved automatically by
file extension. Write config only to: pick between competing servers, set a
priority, pass initialization options, override extensions, set env, or
disable a server.
Two project-scoped config files, identical JSON shape:
- Codex harness β
.codex/lsp-client.json(user:~/.codex/lsp-client.json) - OpenCode/omo harness β
.opencode/lsp.json(also.omo/lsp.json)
{
"lsp": {
"<server-id>": {
"command": ["<bin>", "<args>"], // optional for builtin ids (supplied automatically)
"extensions": [".ext"], // optional override
"priority": 100, // higher wins when several servers match an extension
"initialization": { }, // server-specific initializationOptions
"env": { "KEY": "value" }, // optional
"disabled": false // set true to turn a server off
}
}
}
Rules enforced by config-loader.ts:
- In a project config (
.codex/lsp-client.json,.opencode/lsp.json) an entry whose id is a builtin server inheritscommandautomatically β you only overrideextensions/priority/initialization. A non-builtin id in a project config is ignored. - To define a fully custom (non-builtin) server with its own
command, put it in the user config (~/.codex/lsp-client.json, or the path set byLSP_TOOLS_MCP_USER_CONFIG), wherecommand+extensionsare honored. - Project entries win over user entries; both win over builtin defaults.
Each language reference gives a ready-to-paste snippet.
4. Verify
Run a real diagnostics roundtrip against a source file. This spawns the server,
opens the file, requests diagnostics, and reports OK/FAIL:
bun scripts/verify-lsp.ts <path/to/file.ext>
bun scripts/verify-lsp.ts <file> --timeout=90000
β¦
Pertanyaan umum
Apa itu 'language server'?
Ini adalah program yang memahami bahasa pemrograman Anda dan membantu editor kode menampilkan informasi berguna, seperti error dan saran.
Bahasa apa saja yang didukung?
Tool ini mendukung berbagai bahasa seperti TypeScript, Python, Go, Rust, C/C++, Java, C#, Swift, Ruby, PHP, Dart, Elixir, Zig, Lua, Bash, YAML, Terraform, Haskell, dan Julia.
Apakah saya perlu menginstal sesuatu terlebih dahulu?
Ya, Anda mungkin perlu menginstal language server untuk bahasa pemrograman Anda dengan mengikuti petunjuk yang diberikan oleh tool.
Detail
Deskripsi asli dari pembuat
Configures 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.
Popularitas
- Bintang GitHub
- 70k
- Peringkat
- #3135
- Lisensi
- NOASSERTION
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
comment-checker
70kMembantu agent Anda memahami dan menanggapi feedback dari pengecek komentar otomatis. Berguna untuk memproses hasil review kode atau konten otomatis.
lcx-contribute-bug-fix
70kMembantu agent Anda berkontribusi dalam perbaikan bug untuk proyek terkait LazyCodex. Agent membuat issue atau pull request untuk menjaga kualitas kode.
lcx-doctor
70kMemungkinkan agent Anda mengecek kesehatan instalasi LazyCodex dan Codex CLI. Berguna saat sistem berperilaku aneh setelah update atau perubahan.
lcx-report-bug
70kMembantu agent Anda melaporkan bug secara detail untuk proyek LazyCodex. Agent membuat issue berisi informasi yang berguna agar developer bisa memperbaiki masalahnya.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.