Skip to content

Comments

Add Ruby LSP plugin with inline lspServers configuration#106

Open
obahareth wants to merge 1 commit intoanthropics:mainfrom
obahareth:main
Open

Add Ruby LSP plugin with inline lspServers configuration#106
obahareth wants to merge 1 commit intoanthropics:mainfrom
obahareth:main

Conversation

@obahareth
Copy link

@obahareth obahareth commented Jan 3, 2026

Summary

Add the Ruby LSP plugin to the official marketplace following the existing conventions set out in a previous PR for pre-existing LSP plugins. This enables the LSP plugin recommendation feature in Claude Code to detect the Ruby LSP plugin alongside existing LSP plugins directly from the marketplace.

LSP plugin added

Plugin Language Extensions Binary
ruby-lsp Ruby .rb, .rake, .gemspec, .ru, .erb ruby-lsp

Implementation

Following the existing conventions set out in a previous PR for pre-existing LSP plugins:

  • The plugin uses strict: false since it only provides LSP configuration

Test plan

  • claude plugin validate . passes
  • Plugin installs successfully via claude plugin install ruby-lsp@marketplace
  • Verify LSP activates for Ruby files when ruby-lsp binary is installed (blocked by #13952)

Note: LSP server activation is currently blocked by a known race condition issue (#13952) affecting LSP plugins. The plugin configuration follows the exact same pattern as other working LSP plugins and should function once the issue is resolved.

Example Usage

This is quite a verbose example, but I used this to test on 2.0.67 which isn't affected by the race condition and it works.

ENABLE_LSP_TOOL=true timeout 45 bun x @anthropic-ai/claude-code@2.0.67 --plugin-dir . --dangerously-skip-permissions --verbose -p "Using LSP, list all symbols in /tmp/test_ruby.rb" 2>&1 | grep -A20 "LSP\|symbols\|Hello\|greet" | head -40
The file `/tmp/test_ruby.rb` contains the following symbols:

| Symbol | Kind | Line |
|--------|------|------|
| `Hello` | Class | 1 |
| `greet` | Method | 2 |
| `farewell` | Method | 6 |

The structure shows a `Hello` class with two methods: `greet` and `farewell`.

This is the test file I used

class Hello
  def greet
    puts "Hello, World!"
  end

  def farewell
    puts "Goodbye!"
  end
end

Installation

Users need to install the ruby-lsp binary separately:

gem install ruby-lsp

More Information

@yasaichi
Copy link

I am wondering what is preventing this PR from being merged, given that the issue anthropics/claude-code#13952 has been fixed in v2.1.0.

Fixed race condition where LSP tool could return "no server available" during startup

@jonesdeini
Copy link

I would love to see this get merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants