Skip to content

Add ruby-lsp language server support#9378

Open
tchiadeu wants to merge 1 commit intowarpdotdev:masterfrom
tchiadeu:feat/ruby-lsp
Open

Add ruby-lsp language server support#9378
tchiadeu wants to merge 1 commit intowarpdotdev:masterfrom
tchiadeu:feat/ruby-lsp

Conversation

@tchiadeu
Copy link
Copy Markdown

Description

Adds Shopify's ruby-lsp as a built-in LSP server in Warp's editor.

This is Phase 1: the gem must be installed on the user's PATH (gem install ruby-lsp). No bundled Ruby runtime, no auto-install — the same posture as gopls.

Wiring

  • LanguageId::Ruby recognizes .rb, .rbw, .rake, .gemspec, .ru, plus the well-known filenames Gemfile, Rakefile, Guardfile, Capfile.
  • LSPServerType::RubyLsp runs the ruby-lsp binary over stdio with no extra args (appended at the end of the enum to preserve sqlite persistence ordering).
  • RubyLspCandidate heuristically suggests itself when the workspace contains Gemfile, Rakefile, .ruby-version, config.ru, or any *.gemspec. install / fetch_latest_server_metadata bail with a clear "install via gem install ruby-lsp" message.

Tree-sitter / highlighting was already in place via arborium::lang_ruby, so no crates/languages changes were needed.

Testing

  • cargo test -p lsp (21 passed, including 5 new Ruby-specific unit tests covering filename + extension detection, language→server mapping, binary name, and language label).
  • cargo fmt -- --check clean.
  • cargo clippy -p lsp --all-targets --all-features --tests -- -D warnings clean.

Manual smoke test pending on a downstream consumer's Ruby project.

Note to maintainers: per discussion in #8790, the long-term direction may favor #8803 (custom-LSP-config) over hardcoding new languages. Happy to gate this behind a feature flag or close in favor of that effort if preferred.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-IMPROVEMENT: Added built-in support for Shopify's ruby-lsp language server in the editor (install via gem install ruby-lsp).


Authored with assistance from Warp Agent Mode.

Wires Shopify's ruby-lsp into Warp's editor as a built-in LSP server.
Phase 1: relies on the user's PATH (`gem install ruby-lsp`); no bundled
Ruby runtime and no auto-install.

- Add Ruby variant to LanguageId; map .rb/.rbw/.rake/.gemspec/.ru and
  Gemfile/Rakefile/Guardfile/Capfile filenames.
- Add RubyLsp variant to LSPServerType (binary: ruby-lsp, no args).
- Implement RubyLspCandidate detecting Ruby projects via Gemfile,
  Rakefile, .ruby-version, config.ru, or any .gemspec.
- Register the new servers/ruby_lsp module.
- Unit tests cover language id detection (extension + filename),
  language→server mapping, binary name, and language label.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @tchiadeu on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@tchiadeu

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds Ruby file detection and a RubyLsp server type backed by the ruby-lsp executable, plus unit coverage for Ruby extension/filename mapping and server metadata helpers.

Concerns

  • No blocking correctness, security, or error-handling concerns were found in the changed diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@tchiadeu
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

The cla-bot has been summoned, and re-checked this pull request!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant