Skip to content

feat(ruby): add Fuzzy Ruby Server language server support#283

Merged
vitallium merged 5 commits into
zed-extensions:mainfrom
candidosales:fuzzy-ruby-server
May 8, 2026
Merged

feat(ruby): add Fuzzy Ruby Server language server support#283
vitallium merged 5 commits into
zed-extensions:mainfrom
candidosales:fuzzy-ruby-server

Conversation

@candidosales
Copy link
Copy Markdown
Contributor

@candidosales candidosales commented Apr 20, 2026

Summary

Adds Fuzzy Ruby Server as a supported language server in the Ruby extension. This was requested by the Zed team after closing zed-industries/extensions#5107 — all Ruby language servers should live in this single extension rather than in separate extensions.

Fuzzy Ruby Server is a Rust binary (not a Ruby gem), so its integration intentionally bypasses the bundler/gemset installation logic used by the other language servers.

What's included

  • Registers fuzzy-ruby-server in extension.toml
  • Adds FuzzyRubyServer struct implementing the LanguageServer trait with a custom language_server_binary that:
    • Honors user-configured binary path via lsp.fuzzy-ruby-server.binary.path in Zed settings (with existence validation and a clear error message if the path is invalid)
    • Falls back to PATH lookup for the fuzzy binary
    • Returns a descriptive install hint if the binary is not found
  • Extends WorktreeLike and FakeWorktree with a which() method for testability
  • Adds 6 unit tests covering all resolution branches (custom path, missing path, PATH lookup, not found)

Installation

Users must install the binary manually:

cargo install --git https://github.com/doompling/fuzzy_ruby_server

Or configure an explicit path in Zed settings:

{
  "lsp": {
    "fuzzy-ruby-server": {
      "binary": {
        "path": "/path/to/fuzzy"
      }
    }
  }
}

Test plan

  • All 57 unit tests pass (cargo test)
  • Unit tests cover: valid custom path, invalid custom path, PATH lookup success, PATH lookup failure
  • Manual: open a Ruby project in Zed with fuzzy installed and verify completions work
  • Manual: configure an explicit binary path and verify it is used
  • Manual: verify the error message when fuzzy is not installed

@cla-bot cla-bot Bot added the cla-signed label Apr 20, 2026
…erage

- Updated GEM_NAME to a non-empty sentinel value to avoid silent failures in gem operations.
- Refactored language_server_binary to separate binary resolution logic for custom paths and PATH lookups.
- Added checks for the existence and executability of custom binary paths.
- Enhanced testing coverage for language_server_binary, including tests for custom paths, PATH discovery, and error handling.
- Introduced new methods in the WorktreeLike trait to facilitate testing.
- Documented findings and suggestions for maintainability and reliability improvements.
@candidosales candidosales marked this pull request as ready for review April 20, 2026 03:35
@candidosales
Copy link
Copy Markdown
Contributor Author

@vitallium , when you get a chance, could you review it? 🙇

@vitallium
Copy link
Copy Markdown
Collaborator

@vitallium , when you get a chance, could you review it? 🙇

Hi @candidosales. Thanks for opening this PR! I'll review this PR after May 1st because I'm on vacation at the moment.

To land it, we'll need to make sure the new LSP is disabled in the Zed settings here, otherwise it will be enabled for all users by default. Thanks!

@vitallium vitallium self-requested a review April 22, 2026 08:58
AnkanMisra pushed a commit to AnkanMisra/zed that referenced this pull request May 1, 2026
…dustries#55215)

## Summary

Add `!fuzzy-ruby-server` to the Ruby language servers list in the
default settings so it is opt-in rather than enabled for all users by
default.

This is a prerequisite for merging the Fuzzy Ruby Server support in the
Ruby extension: zed-extensions/ruby#283

As requested by @vitallium in the review comment:
https://github.com/zed-extensions/ruby/pull/283\#issuecomment-4294888519

## Change

```diff
- "language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "!sorbet", "!steep", "!kanayago", "..."],
+ "language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "!sorbet", "!steep", "!kanayago", "!fuzzy-ruby-server", "..."],
```

Release Notes:

- Disabled `fuzzy-ruby-server` by default for Ruby files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
@candidosales
Copy link
Copy Markdown
Contributor Author

@vitallium, the zed settings PR was merged. Could you review this one when you get a chance? Thanks

ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…dustries#55215)

## Summary

Add `!fuzzy-ruby-server` to the Ruby language servers list in the
default settings so it is opt-in rather than enabled for all users by
default.

This is a prerequisite for merging the Fuzzy Ruby Server support in the
Ruby extension: zed-extensions/ruby#283

As requested by @vitallium in the review comment:
https://github.com/zed-extensions/ruby/pull/283\#issuecomment-4294888519

## Change

```diff
- "language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "!sorbet", "!steep", "!kanayago", "..."],
+ "language_servers": ["solargraph", "!ruby-lsp", "!rubocop", "!sorbet", "!steep", "!kanayago", "!fuzzy-ruby-server", "..."],
```

Release Notes:

- Disabled `fuzzy-ruby-server` by default for Ruby files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
@vitallium
Copy link
Copy Markdown
Collaborator

@vitallium, the zed settings PR was merged. Could you review this one when you get a chance? Thanks

Thank you!

@vitallium vitallium merged commit 7ea0d40 into zed-extensions:main May 8, 2026
5 checks passed
@stgm
Copy link
Copy Markdown

stgm commented May 13, 2026

@vitallium @candidosales

Was it the intention that this is enabled by default and thus presents an error for all Zed users editing ruby? (that fuzzy-ruby-server is not installed)

And shouldn't this be documented at https://zed.dev/docs/languages/ruby ?

I am genuinely confused by the intent here, these are not meant as rhetorical questions.

@vitallium
Copy link
Copy Markdown
Collaborator

@vitallium @candidosales

Was it the intention that this is enabled by default and thus presents an error for all Zed users editing ruby? (that fuzzy-ruby-server is not installed)

And shouldn't this be documented at https://zed.dev/docs/languages/ruby ?

I am genuinely confused by the intent here, these are not meant as rhetorical questions.

Hi @stgm. My apologies for this issue. It wasn’t intentional. This is a sync problem on our side.

To add a new Ruby language server, it first needs to be added to the default Zed settings, but explicitly disabled. Then we need to wait for the next stable Zed release, and only after that release a new version of the Ruby extension.

Apparently, I made a mistake and missed the fact that the fuzzy server wasn’t included in a Zed release yet. I think there’s a gap in our process here. In fact, this is the second time we’ve had a similar problem, so we need to find a way to prevent issues like this in the future.

Regarding the documentation, that’s also a valid point. For example, the documentation still doesn’t mention the ‘kanayago’ LS. I do plan to update the documentation.

Sorry again, and thanks for raising these questions!

@stgm
Copy link
Copy Markdown

stgm commented May 13, 2026

@vitallium Thank you for the explanation, that helps :-)

FWIW some context: I have no custom plain ruby language config at the moment, and Zed now uses herb and solargraph. I had rubocop custom configured for a while, but the default suits me fine as it is.

For me it's interesting and relevant to know (in the docs, I'm not in a hurry!) whether I would want to replace other LSPs with fuzzy-ruby-server, and why; or if it would complement those servers.

In the docs I kind of like how erb-formatter is presented as opt-in, just the setting to copy-paste. (Not really relevant but it's also very weird that the Tailwind thingy appears to be enabled by default.)

Oh and also relevant: I'm a long time Textmate user for Rails projects (switched to Zed a year ago) and have always worked very well without language servers. But some unobtrusive assistance is of course very nice. For someone like me, the omakase approach works better than having many (conflicting) options.

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.

3 participants