Skip to content
Back to search

claude-code-lsps

MarketplaceWorks with Claude CodeGitHub

LSP plugins for Claude Code — Astro, Bash/Shell, C/C++/Objective-C, C#, Clojure, Dart/Flutter, Elixir, Gleam, Go, Java, Kotlin, Lua, Nix, OCaml, PHP, Python, Ruby, Rust, Swift, Terraform, TypeScript/JavaScript, YAML & Zig

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/boostvolt--claude-code-lsps/badge.svg)](/listings/boostvolt--claude-code-lsps)

HTML

<a href="/listings/boostvolt--claude-code-lsps"><img src="/api/listings/boostvolt--claude-code-lsps/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Add the Marketplace

claude
/plugin marketplace add boostvolt/claude-code-lsps

2. Install Plugins

Install individual plugins:

/plugin install bash-language-server@claude-code-lsps
/plugin install clangd@claude-code-lsps
/plugin install clojure-lsp@claude-code-lsps
/plugin install dart-analyzer@claude-code-lsps
/plugin install elixir-ls@claude-code-lsps
/plugin install gleam@claude-code-lsps
/plugin install gopls@claude-code-lsps
/plugin install intelephense@claude-code-lsps
/plugin install wordpress-intelephense@claude-code-lsps
/plugin install jdtls@claude-code-lsps
/plugin install kotlin-lsp@claude-code-lsps
/plugin install lua-language-server@claude-code-lsps
/plugin install nixd@claude-code-lsps
/plugin install ocaml-lsp@claude-code-lsps
/plugin install omnisharp@claude-code-lsps
/plugin install pyright@claude-code-lsps
/plugin install rust-analyzer@claude-code-lsps
/plugin install solargraph@claude-code-lsps
/plugin install sourcekit-lsp@claude-code-lsps
/plugin install terraform-ls@claude-code-lsps
/plugin install vtsls@claude-code-lsps
/plugin install yaml-language-server@claude-code-lsps
/plugin install zls@claude-code-lsps

Or browse and install interactively:

/plugin

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 269 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "claude-code-lsps",
  4. "metadata": {
  5. "description": "LSP plugins for Claude Code",
  6. "version": "1.0.0",
  7. "license": "MIT",
  8. "repository": "https://github.com/boostvolt/claude-code-lsps",
  9. "homepage": "https://github.com/boostvolt/claude-code-lsps"
  10. },
  11. "owner": {
  12. "name": "Jan Kott"
  13. },
  14. "plugins": [
  15. {
  16. "name": "astro-lsp",
  17. "version": "1.0.0",
  18. "source": "./astro_lsp",
  19. "description": "Astro language server",
  20. "category": "development",
  21. "tags": ["astro", "lsp"],
  22. "author": {
  23. "name": "synxn1o"
  24. }
  25. },
  26. {
  27. "name": "bash-language-server",
  28. "version": "1.0.0",
  29. "source": "./bash-language-server",
  30. "description": "Bash language server",
  31. "category": "development",
  32. "tags": ["bash", "shell", "sh", "zsh", "lsp"],
  33. "author": {
  34. "name": "Jan Kott"
  35. }
  36. },
  37. {
  38. "name": "clangd",
  39. "version": "1.0.0",
  40. "source": "./clangd",
  41. "description": "C/C++ language server",
  42. "category": "development",
  43. "tags": ["c", "cpp", "lsp"],
  44. "author": {
  45. "name": "Jan Kott"
  46. }
  47. },
  48. {
  49. "name": "clojure-lsp",
  50. "version": "1.0.0",
  51. "source": "./clojure-lsp",
  52. "description": "Clojure language server",
  53. "category": "development",
  54. "tags": ["clojure", "clojurescript", "lsp"],
  55. "author": {
  56. "name": "Jan Kott"
  57. }
  58. },
  59. {
  60. "name": "dart-analyzer",
  61. "version": "1.0.0",
  62. "source": "./dart-analyzer",
  63. "description": "Dart/Flutter language server",
  64. "category": "development",
  65. "tags": ["dart", "flutter", "lsp"],
  66. "author": {
  67. "name": "Jan Kott"
  68. }
  69. },
  70. {
  71. "name": "elixir-ls",
  72. "version": "1.0.0",
  73. "source": "./elixir-ls",
  74. "description": "Elixir language server",
  75. "category": "development",
  76. "tags": ["elixir", "erlang", "beam", "lsp"],
  77. "author": {
  78. "name": "Jan Kott"
  79. }
  80. },
  81. {
  82. "name": "gleam",
  83. "version": "1.0.0",
  84. "source": "./gleam",
  85. "description": "Gleam language server",
  86. "category": "development",
  87. "tags": ["gleam", "beam", "lsp"],
  88. "author": {
  89. "name": "Jan Kott"
  90. }
  91. },
  92. {
  93. "name": "gopls",
  94. "version": "1.0.0",
  95. "source": "./gopls",
  96. "description": "Go language server",
  97. "category": "development",
  98. "tags": ["go", "lsp"],
  99. "author": {
  100. "name": "Jan Kott"
  101. }
  102. },
  103. {
  104. "name": "intelephense",
  105. "version": "1.0.0",
  106. "source": "./intelephense",
  107. "description": "PHP language server",
  108. "category": "development",
  109. "tags": ["php", "lsp"],
  110. "author": {
  111. "name": "Jan Kott"
  112. }
  113. },
  114. {
  115. "name": "jdtls",
  116. "version": "1.0.0",
  117. "source": "./jdtls",
  118. "description": "Java language server",
  119. "category": "development",
  120. "tags": ["java", "lsp"],
  121. "author": {
  122. "name": "Jan Kott"
  123. }
  124. },
  125. {
  126. "name": "kotlin-lsp",
  127. "version": "1.0.0",
  128. "source": "./kotlin-lsp",
  129. "description": "Kotlin language server",
  130. "category": "development",
  131. "tags": ["kotlin", "lsp"],
  132. "author": {
  133. "name": "Jan Kott"
  134. }
  135. },
  136. {
  137. "name": "lua-language-server",
  138. "version": "1.0.0",
  139. "source": "./lua-language-server",
  140. "description": "Lua language server",
  141. "category": "development",
  142. "tags": ["lua", "lsp"],
  143. "author": {
  144. "name": "Jan Kott"
  145. }
  146. },
  147. {
  148. "name": "nixd",
  149. "version": "1.0.0",
  150. "source": "./nixd",
  151. "description": "Nix language server",
  152. "category": "development",
  153. "tags": ["nix", "nixos", "lsp"],
  154. "author": {
  155. "name": "Jan Kott"
  156. }
  157. },
  158. {
  159. "name": "ocaml-lsp",
  160. "version": "1.0.0",
  161. "source": "./ocaml-lsp",
  162. "description": "OCaml language server",
  163. "category": "development",
  164. "tags": ["ocaml", "ml", "lsp"],
  165. "author": {
  166. "name": "Jan Kott"
  167. }
  168. },
  169. {
  170. "name": "omnisharp",
  171. "version": "1.0.0",
  172. "source": "./omnisharp",
  173. "description": "C# language server",
  174. "category": "development",
  175. "tags": ["csharp", "dotnet", "lsp"],
  176. "author": {
  177. "name": "Jan Kott"
  178. }
  179. },
  180. {
  181. "name": "pyright",
  182. "version": "1.0.0",
  183. "source": "./pyright",
  184. "description": "Python language server",
  185. "category": "development",
  186. "tags": ["python", "lsp"],
  187. "author": {
  188. "name": "Jan Kott"
  189. }
  190. },
  191. {
  192. "name": "rust-analyzer",
  193. "version": "1.0.0",
  194. "source": "./rust-analyzer",
  195. "description": "Rust language server",
  196. "category": "development",
  197. "tags": ["rust", "lsp"],
  198. "author": {
  199. "name": "Jan Kott"
  200. }
  201. },
  202. {
  203. "name": "solargraph",
  204. "version": "1.0.0",
  205. "source": "./solargraph",
  206. "description": "Ruby language server",
  207. "category": "development",
  208. "tags": ["ruby", "lsp"],
  209. "author": {
  210. "name": "Jan Kott"
  211. }
  212. },
  213. {
  214. "name": "sourcekit-lsp",
  215. "version": "1.0.0",
  216. "source": "./sourcekit-lsp",
  217. "description": "Swift language server",
  218. "category": "development",
  219. "tags": ["swift", "ios", "macos", "lsp"],
  220. "author": {
  221. "name": "Jan Kott"
  222. }
  223. },
  224. {
  225. "name": "terraform-ls",
  226. "version": "1.0.0",
  227. "source": "./terraform-ls",
  228. "description": "Terraform language server",
  229. "category": "development",
  230. "tags": ["terraform", "hcl", "devops", "lsp"],
  231. "author": {
  232. "name": "Jan Kott"
  233. }
  234. },
  235. {
  236. "name": "vtsls",
  237. "version": "1.0.0",
  238. "source": "./vtsls",
  239. "description": "TypeScript/JavaScript language server",
  240. "category": "development",
  241. "tags": ["typescript", "javascript", "lsp"],
  242. "author": {
  243. "name": "Jan Kott"
  244. }
  245. },
  246. {
  247. "name": "yaml-language-server",
  248. "version": "1.0.0",
  249. "source": "./yaml-language-server",
  250. "description": "YAML language server",
  251. "category": "development",
  252. "tags": ["yaml", "yml", "lsp"],
  253. "author": {
  254. "name": "Jan Kott"
  255. }
  256. },
  257. {
  258. "name": "zls",
  259. "version": "1.0.0",
  260. "source": "./zls",
  261. "description": "Zig language server",
  262. "category": "development",
  263. "tags": ["zig", "lsp"],
  264. "author": {
  265. "name": "Jan Kott"
  266. }
  267. }
  268. ]
  269. }
README.md · README · 517 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Claude Code LSPs
  2. A collection of Language Server Protocol (LSP) plugins for [Claude Code](https://github.com/anthropics/claude-code).
  3. ![LSP Demo](assets/lsp-demo.png)
  4. ## What is LSP Integration?
  5. > [!NOTE]
  6. > **LSP Integration:** If you're on v2.0.69 through v2.0.x, LSP integration is broken due to a race condition ([#14803](https://github.com/anthropics/claude-code/issues/14803), [#13952](https://github.com/anthropics/claude-code/issues/13952)). This has been fixed in v2.1.0+. Please upgrade to the latest version.
  7. The Language Server Protocol provides IDE-like intelligence to Claude Code. On startup, Claude Code automatically starts LSP servers from installed plugins and exposes them to Claude in two ways:
  8. **LSP Tool** - A builtin tool with 9 operations mapping directly to LSP commands:
  9. | Operation | Description |
  10. | ---------------------- | --------------------------------------------------------------- |
  11. | `goToDefinition` | Find where a symbol is defined |
  12. | `findReferences` | Find all references to a symbol |
  13. | `hover` | Get hover info (docs, type info) for a symbol |
  14. | `documentSymbol` | Get all symbols (functions, classes, variables) in a document |
  15. | `workspaceSymbol` | Search for symbols across the entire workspace |
  16. | `goToImplementation` | Find implementations of an interface/abstract method |
  17. | `prepareCallHierarchy` | Get call hierarchy item at a position |
  18. | `incomingCalls` | Find all functions/methods that call the function at a position |
  19. | `outgoingCalls` | Find all functions/methods called by the function at a position |
  20. **Automatic Diagnostics** - Real-time error and warning detection similar to the VS Code integration, but operating independently. These diagnostics tend to be faster and more comprehensive than the VS Code equivalent.
  21. ## Available Plugins
  22. | Plugin | Language | Extensions | LSP |
  23. | -------------------------------------------------- | --------------------- | ------------------------------------------- | -------------------------------------------------------------------------------- |
  24. | [bash-language-server](./bash-language-server) | Bash/Shell | `.sh` `.bash` `.zsh` `.ksh` | [bash-language-server](https://github.com/bash-lsp/bash-language-server) |
  25. | [clangd](./clangd) | C/C++/Objective-C | `.c` `.h` `.cpp` `.hpp` `.cc` `.cxx` `.hxx` `.m` `.mm` | [clangd](https://clangd.llvm.org/) |
  26. | [clojure-lsp](./clojure-lsp) | Clojure | `.clj` `.cljs` `.cljc` `.edn` | [clojure-lsp](https://github.com/clojure-lsp/clojure-lsp) |
  27. | [dart-analyzer](./dart-analyzer) | Dart/Flutter | `.dart` | [Dart SDK](https://dart.dev/tools/dart-analyze) |
  28. | [elixir-ls](./elixir-ls) | Elixir | `.ex` `.exs` | [elixir-ls](https://github.com/elixir-lsp/elixir-ls) |
  29. | [gleam](./gleam) | Gleam | `.gleam` | [gleam](https://gleam.run/) |
  30. | [gopls](./gopls) | Go | `.go` | [gopls](https://github.com/golang/tools/tree/master/gopls) |
  31. | [intelephense](./intelephense) | PHP | `.php` `.phtml` | [Intelephense](https://github.com/bmewburn/intelephense-docs) |
  32. | [wordpress-intelephense](./wordpress-intelephense) | PHP (WordPress) | `.php` `.phtml` | [Intelephense](https://github.com/bmewburn/intelephense-docs) |
  33. | [jdtls](./jdtls) | Java | `.java` | [jdtls](https://github.com/eclipse-jdtls/eclipse.jdt.ls) |
  34. | [kotlin-lsp](./kotlin-lsp) | Kotlin | `.kt` `.kts` | [kotlin-lsp](https://github.com/Kotlin/kotlin-lsp) |
  35. | [lua-language-server](./lua-language-server) | Lua | `.lua` | [lua-language-server](https://github.com/LuaLS/lua-language-server) |
  36. | [nixd](./nixd) | Nix | `.nix` | [nixd](https://github.com/nix-community/nixd) |
  37. | [ocaml-lsp](./ocaml-lsp) | OCaml | `.ml` `.mli` | [ocaml-lsp](https://github.com/ocaml/ocaml-lsp) |
  38. | [omnisharp](./omnisharp) | C# | `.cs` `.csx` | [OmniSharp](https://github.com/OmniSharp/omnisharp-roslyn) |
  39. | [pyright](./pyright) | Python | `.py` `.pyi` | [pyright](https://github.com/microsoft/pyright) |
  40. | [rust-analyzer](./rust-analyzer) | Rust | `.rs` | [rust-analyzer](https://github.com/rust-lang/rust-analyzer) |
  41. | [solargraph](./solargraph) | Ruby | `.rb` `.rake` `.gemspec` | [Solargraph](https://github.com/castwide/solargraph) |
  42. | [sourcekit-lsp](./sourcekit-lsp) | Swift | `.swift` | [sourcekit-lsp](https://github.com/swiftlang/sourcekit-lsp) |
  43. | [terraform-ls](./terraform-ls) | Terraform | `.tf` `.tfvars` | [terraform-ls](https://github.com/hashicorp/terraform-ls) |
  44. | [vtsls](./vtsls) | TypeScript/JavaScript | `.ts` `.tsx` `.js` `.jsx` `.mjs` `.cjs` | [vtsls](https://github.com/yioneko/vtsls) |
  45. | [yaml-language-server](./yaml-language-server) | YAML | `.yaml` `.yml` | [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) |
  46. | [zls](./zls) | Zig | `.zig` `.zon` | [zls](https://github.com/zigtools/zls) |
  47. ## Getting Started
  48. ### 1. Add the Marketplace
  49. ```bash
  50. claude
  51. /plugin marketplace add boostvolt/claude-code-lsps
  52. ```
  53. ### 2. Install Plugins
  54. Install individual plugins:
  55. ```bash
  56. /plugin install bash-language-server@claude-code-lsps
  57. /plugin install clangd@claude-code-lsps
  58. /plugin install clojure-lsp@claude-code-lsps
  59. /plugin install dart-analyzer@claude-code-lsps
  60. /plugin install elixir-ls@claude-code-lsps
  61. /plugin install gleam@claude-code-lsps
  62. /plugin install gopls@claude-code-lsps
  63. /plugin install intelephense@claude-code-lsps
  64. /plugin install wordpress-intelephense@claude-code-lsps
  65. /plugin install jdtls@claude-code-lsps
  66. /plugin install kotlin-lsp@claude-code-lsps
  67. /plugin install lua-language-server@claude-code-lsps
  68. /plugin install nixd@claude-code-lsps
  69. /plugin install ocaml-lsp@claude-code-lsps
  70. /plugin install omnisharp@claude-code-lsps
  71. /plugin install pyright@claude-code-lsps
  72. /plugin install rust-analyzer@claude-code-lsps
  73. /plugin install solargraph@claude-code-lsps
  74. /plugin install sourcekit-lsp@claude-code-lsps
  75. /plugin install terraform-ls@claude-code-lsps
  76. /plugin install vtsls@claude-code-lsps
  77. /plugin install yaml-language-server@claude-code-lsps
  78. /plugin install zls@claude-code-lsps
  79. ```
  80. Or browse and install interactively:
  81. ```bash
  82. /plugin
  83. ```
  84. ---
  85. ## Manual LSP Installation
  86. Each plugin will attempt to auto-install its LSP server on first use. If auto-install fails, use the manual instructions below.
  87. <details>
  88. <summary><strong>Bash/Shell (bash-language-server)</strong></summary>
  89. ```bash
  90. brew install bash-language-server
  91. ```
  92. Or via npm:
  93. ```bash
  94. npm install -g bash-language-server
  95. ```
  96. </details>
  97. <details>
  98. <summary><strong>C/C++/Objective-C (clangd)</strong></summary>
  99. ```bash
  100. brew install llvm
  101. ```
  102. Or via Xcode Command Line Tools:
  103. ```bash
  104. xcode-select --install
  105. ```
  106. Supports C, C++, Objective-C (.m), and Objective-C++ (.mm) files.
  107. </details>
  108. <details>
  109. <summary><strong>C# (omnisharp)</strong></summary>
  110. ```bash
  111. brew install omnisharp/omnisharp-roslyn/omnisharp-mono
  112. ```
  113. Or via dotnet:
  114. ```bash
  115. dotnet tool install -g csharp-ls
  116. ```
  117. </details>
  118. <details>
  119. <summary><strong>Clojure (clojure-lsp)</strong></summary>
  120. ```bash
  121. brew install clojure-lsp
  122. ```
  123. Or download from [GitHub releases](https://github.com/clojure-lsp/clojure-lsp/releases).
  124. </details>
  125. <details>
  126. <summary><strong>Dart/Flutter (dart-analyzer)</strong></summary>
  127. Install Dart SDK:
  128. ```bash
  129. brew tap dart-lang/dart
  130. brew install dart
  131. ```
  132. Or install Flutter (includes Dart):
  133. ```bash
  134. # See https://docs.flutter.dev/get-started/install
  135. ```
  136. Ensure `dart` is in your PATH.
  137. </details>
  138. <details>
  139. <summary><strong>Elixir (elixir-ls)</strong></summary>
  140. ```bash
  141. brew install elixir-ls
  142. ```
  143. Requires Elixir to be installed:
  144. ```bash
  145. brew install elixir
  146. ```
  147. </details>
  148. <details>
  149. <summary><strong>Gleam (gleam)</strong></summary>
  150. ```bash
  151. brew install gleam
  152. ```
  153. Or download from [GitHub releases](https://github.com/gleam-lang/gleam/releases).
  154. </details>
  155. <details>
  156. <summary><strong>Go (gopls)</strong></summary>
  157. ```bash
  158. go install golang.org/x/tools/gopls@latest
  159. ```
  160. Ensure `~/go/bin` is in your PATH.
  161. </details>
  162. <details>
  163. <summary><strong>Java (jdtls)</strong></summary>
  164. ```bash
  165. brew install jdtls
  166. ```
  167. Or download manually from [Eclipse JDT Language Server](http://download.eclipse.org/jdtls/snapshots/).
  168. Requires Java 21+ runtime.
  169. </details>
  170. <details>
  171. <summary><strong>Kotlin (kotlin-lsp)</strong></summary>
  172. ```bash
  173. brew install JetBrains/utils/kotlin-lsp
  174. ```
  175. Or download from [GitHub releases](https://github.com/Kotlin/kotlin-lsp/releases).
  176. Requires Java 17+.
  177. </details>
  178. <details>
  179. <summary><strong>Lua (lua-language-server)</strong></summary>
  180. ```bash
  181. brew install lua-language-server
  182. ```
  183. Or download from [GitHub releases](https://github.com/LuaLS/lua-language-server/releases).
  184. </details>
  185. <details>
  186. <summary><strong>Nix (nixd)</strong></summary>
  187. ```bash
  188. nix profile install nixpkgs#nixd
  189. ```
  190. Requires Nix to be installed. See [nixos.org](https://nixos.org/download/).
  191. </details>
  192. <details>
  193. <summary><strong>OCaml (ocaml-lsp)</strong></summary>
  194. ```bash
  195. opam install ocaml-lsp-server
  196. ```
  197. Requires opam to be installed:
  198. ```bash
  199. brew install opam
  200. opam init
  201. ```
  202. </details>
  203. <details>
  204. <summary><strong>PHP (intelephense)</strong></summary>
  205. ```bash
  206. npm install -g intelephense
  207. ```
  208. </details>
  209. <details>
  210. <summary><strong>PHP / WordPress (wordpress-intelephense)</strong></summary>
  211. Same LSP as `intelephense` but with WordPress stubs enabled. Install this **instead of** `intelephense` for WordPress projects.
  212. ```bash
  213. npm install -g intelephense
  214. ```
  215. </details>
  216. <details>
  217. <summary><strong>Python (pyright)</strong></summary>
  218. ```bash
  219. pip install pyright
  220. ```
  221. </details>
  222. <details>
  223. <summary><strong>Ruby (solargraph)</strong></summary>
  224. ```bash
  225. gem install solargraph
  226. ```
  227. </details>
  228. <details>
  229. <summary><strong>Rust (rust-analyzer)</strong></summary>
  230. ```bash
  231. brew install rust-analyzer
  232. ```
  233. Or via rustup:
  234. ```bash
  235. rustup component add rust-analyzer
  236. ```
  237. </details>
  238. <details>
  239. <summary><strong>Swift (sourcekit-lsp)</strong></summary>
  240. sourcekit-lsp is bundled with Xcode. Install Xcode from the App Store:
  241. ```bash
  242. # Verify installation
  243. xcrun --find sourcekit-lsp
  244. ```
  245. Or install a Swift toolchain from [swift.org/install](https://swift.org/install/).
  246. </details>
  247. <details>
  248. <summary><strong>Terraform (terraform-ls)</strong></summary>
  249. ```bash
  250. brew install terraform-ls
  251. ```
  252. Or download from [GitHub releases](https://github.com/hashicorp/terraform-ls/releases).
  253. </details>
  254. <details>
  255. <summary><strong>TypeScript/JavaScript (vtsls)</strong></summary>
  256. ```bash
  257. npm install -g @vtsls/language-server typescript
  258. ```
  259. </details>
  260. <details>
  261. <summary><strong>YAML (yaml-language-server)</strong></summary>
  262. ```bash
  263. brew install yaml-language-server
  264. ```
  265. Or via npm:
  266. ```bash
  267. npm install -g yaml-language-server
  268. ```
  269. </details>
  270. <details>
  271. <summary><strong>Zig (zls)</strong></summary>
  272. ```bash
  273. brew install zls
  274. ```
  275. Requires Zig to be installed. Download from [ziglang.org](https://ziglang.org/download/).
  276. </details>
  277. ---
  278. ## Creating Your Own Plugin
  279. <details>
  280. <summary><strong>Plugin Structure</strong></summary>
  281. ```
  282. my-lsp/
  283. ├── .claude-plugin/
  284. │ └── plugin.json
  285. ├── .lsp.json
  286. └── hooks/
  287. ├── hooks.json
  288. └── check-my-lsp.sh
  289. ```
  290. </details>
  291. <details>
  292. <summary><strong>.lsp.json Schema</strong></summary>
  293. The `.lsp.json` file configures the language server:
  294. ```json
  295. {
  296. "language-id": {
  297. "command": "lsp-server-command",
  298. "extensionToLanguage": {
  299. ".ext": "language-id"
  300. }
  301. }
  302. }
  303. ```
  304. **Required Fields**
  305. | Field | Type | Description |
  306. | --------------------- | ------ | ------------------------------------ |
  307. | `command` | string | Command to start the LSP server |
  308. | `extensionToLanguage` | object | Maps file extensions to language IDs |
  309. **Optional Fields**
  310. | Field | Type | Description |
  311. | ----------------------- | -------- | ---------------------------------------------------------------- |
  312. | `args` | string[] | Arguments passed to the command |
  313. | `transport` | string | Communication method: `"stdio"` (default) or `"socket"` |
  314. | `env` | object | Environment variables to set when starting the server |
  315. | `initializationOptions` | object | Options passed during LSP initialization |
  316. | `settings` | object | Server-specific settings via `workspace/didChangeConfiguration` |
  317. | `workspaceFolder` | string | Workspace folder path for the server |
  318. | `startupTimeout` | number | Max time to wait for server startup (milliseconds) |
  319. | `shutdownTimeout` | number | Max time to wait for graceful shutdown (milliseconds) |
  320. | `restartOnCrash` | boolean | Whether to automatically restart the server if it crashes |
  321. | `maxRestarts` | number | Max restart attempts before giving up (default: 3) |
  322. </details>
  323. <details>
  324. <summary><strong>Example: gopls</strong></summary>
  325. `.lsp.json`:
  326. ```json
  327. {
  328. "go": {
  329. "command": "gopls",
  330. "extensionToLanguage": {
  331. ".go": "go"
  332. }
  333. }
  334. }
  335. ```
  336. `.claude-plugin/plugin.json`:
  337. ```json
  338. {
  339. "name": "gopls",
  340. "description": "Go language server",
  341. "version": "1.0.0",
  342. "author": {
  343. "name": "Your Name"
  344. },
  345. "license": "MIT",
  346. "repository": "https://github.com/boostvolt/claude-code-lsps"
  347. }
  348. ```
  349. `hooks/hooks.json` (optional auto-install):
  350. ```json
  351. {
  352. "hooks": {
  353. "SessionStart": [
  354. {
  355. "hooks": [
  356. {
  357. "type": "command",
  358. "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/check-gopls.sh",
  359. "timeout": 30
  360. }
  361. ]
  362. }
  363. ]
  364. }
  365. }
  366. ```
  367. </details>
  368. ---
  369. ## License
  370. MIT
nixd/hooks/check-nixd.sh · Bundled script · 28 lines · 1 finding marked
  1. #!/bin/bash
  2. # Check if nixd is installed and available in PATH
  3. if command -v nixd &> /dev/null; then
  4. exit 0
  5. fi
  6. # Check if nix is installed
  7. if command -v nix &> /dev/null; then
  8. echo "[nixd] Installing via nix..."
  9. nix profile install nixpkgs#nixd
  10. if command -v nixd &> /dev/null; then
  11. echo "[nixd] Installed successfully"
  12. else
  13. echo "[nixd] Installation may have succeeded but binary not in PATH"
  14. fi
  15. exit 0
  16. fi
  17. echo "[nixd] Not installed. Install Nix first, then install nixd:"
  18. echo " sh <(curl -L https://nixos.org/nix/install)"
    • Note: Runs a downloaded script through process substitution (bash <(curl …))
    • Line 23 on GitHub
  19. echo " nix profile install nixpkgs#nixd"
  20. echo ""
  21. echo " See: https://github.com/nix-community/nixd"
  22. exit 0

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.