Shopify/ruby-lsp
59.7
Adequate · 6 November 2026
22.2k
lines of production code
Ruby
with TypeScript
4
measurements over time
What this system is
Features
Add task to verify indexing against Top 100 RubyGems
A new rake task \index:topgems\ has been added to the \rakelib\ directory, allowing users to validate the Ruby indexer against the top 100 most popular RubyGems. This task first downloads the \.gem\ files for these packages into a temporary directory and then indexes all \.rb\ source files within them, reporting any errors encountered during the process. This provides a standardized way to test indexer stability and correctness against a broad set of real-world code.
rakelib · high confidence
Added Sorbet RBI annotations for Minitest, Mocha, and Rainbow
New RBI annotation files have been added for the Minitest, Mocha, and Rainbow gems to improve static type checking. The \minitest.rbi\ file defines signatures for assertion and refutation methods in \Minitest::Assertions\. The \mocha.rbi\ file provides signatures for mocking and stubbing APIs in \Mocha::API\, \Mocha::ClassMethods\, \Mocha::Expectation\, and \Mocha::ObjectMethods\. The \rainbow.rbi\ file covers the \Rainbow\ module, including color classes and presenter methods for terminal styling. A \.gitattributes\ file marks these generated RBI files as vendored.
sorbet/rbi/annotations · high confidence
Added Sorbet RBI shims for Bundler, URI, and RuboCop cops
This change introduces a set of new Sorbet RBI shim files in the \sorbet/rbi/shims\ directory to provide static type definitions for external libraries and internal components. Specifically, it adds shims for Bundler (defining \Bundler::Settings\, \Bundler::CLI::Install\, \Bundler::CLI::Update\, and \Bundler::Thor::Shell::Basic\), the debug gem (\DEBUGGER\\\), \DidYouMean\ (\JaroWinkler\), standard library classes (\File\, \Pathname\, \Gem::Specification\), and URI handling (\URI::Source\, \URI::Generic\, \URI::File\). It also includes shims for internal RuboCop cops (\UseLanguageServerAliases\, \UseRegisterWithHandlerMethod\) and a Sorbet utility constant (\T::Utils::Nilable::NIL\_TYPE\). These shims enable Sorbet to understand the structure of these classes and methods, improving type checking coverage for the Ruby LSP codebase.
sorbet/rbi/shims · high confidence
Documentation site migrated to Jekyll
The documentation website has been rebuilt using Jekyll with the just-the-docs theme. This change introduces a new site structure under the \jekyll\ directory, including configuration for navigation, external links, and custom callout styles, while outputting the generated static site to the \docs\ directory. The migration consolidates documentation content and establishes the foundation for the current documentation hosting.
jekyll · high confidence
Initial Tapioca configuration and strict-typed require file
This change introduces the initial configuration for the Tapioca gem generator and a strict-typed require file for the sorbet/tapioca component. The config.yml file sets up gem type overrides (specifically disabling types for 'psych') and excludes the 'rdoc' gem to prevent build failures, while also providing commented-out placeholders for DSL generator parameters. The new require.rb file, set to strict typing, explicitly loads dependencies including Prism, Mocha, RuboCop, SyntaxTree, Spoom, and Test::Unit, and includes logic to remove the 'yarp' gem's require paths from $LOAD\_PATH to avoid conflicts with the Prism gem's default export.
sorbet/tapioca · high confidence
Initial repository structure and configuration for Ruby LSP v0.26.11
This change establishes the foundational structure for the Ruby LSP project, setting the version to 0.26.11 and configuring the development environment to use Ruby 4.0.5, Node 22.21.1, and the pnpm package manager. It introduces a VS Code workspace configuration that defines the server, extension, and documentation folders, and adds a \.gitmodules\ file to include the Prism parser as a test fixture. The project is now configured with strict Sorbet type checking, RuboCop linting (including custom cops and class structure rules), and a Rakefile that runs both indexer and standard tests by default.
(repo-wide) · high confidence
Introduce Ruby Copilot chat agent for domain-driven design
The extension now includes a new chat participant that acts as a Ruby on Rails and domain-driven design expert. Users can interact with this agent to model specific concepts, receiving suggested model names, attributes, and the corresponding \rails generate\ commands. The agent automatically incorporates the application's existing schema (from \db/schema.rb\ or \db/structure.sql\) into its context to provide more accurate recommendations and offers buttons to directly execute the generated Rails commands or revert them.
vscode/src · high confidence
Introduces a new add-on system and server architecture
The Ruby LSP now supports a plugin architecture, allowing users to install and configure third-party add-ons that can extend features like completion, code lenses, and file watching. This change also refactors the server into a base class with a new global state management system, enabling better handling of client capabilities, formatter selection, and dependency detection. Additionally, the parser has been migrated to Prism, improving performance and accuracy for Ruby and ERB files.
_lib/ruby\lsp · high confidence
New RuboCop cops for Ruby LSP code style and correctness
Two new RuboCop cops have been added to enforce best practices within the Ruby LSP module. The \UseLanguageServerAliases\ cop encourages using local aliases (\Interface\, \Transport\, \Constant\) instead of the full \LanguageServer::Protocol\ namespace to reduce verbosity. The \UseRegisterWithHandlerMethod\ cop ensures consistency in listener registration by flagging cases where a listener is registered without a corresponding handler method, or where a handler method exists without being registered.
lib/rubocop · high confidence
New ruby-lsp-check executable and launcher-based boot flow
Users can now run the new \ruby-lsp-check\ command to verify that all automatic LSP requests and indexing execute successfully across all Ruby files in the project, reporting any errors encountered. The main \ruby-lsp\ executable has been refactored to support a new \--use-launcher\ flag, which delegates bundle composition and server startup to a dedicated \ruby-lsp-launcher\ process. This launcher handles missing dependencies gracefully, allowing the server to start in a degraded mode rather than failing completely if gems are unavailable, and supports beta versions via the \--beta\ flag. The previous \ruby-lsp-test-exec\ helper is marked for removal.
exe · high confidence
Removals
Removal of initial ruby-lsp VS Code extension scaffold
The initial scaffold for the ruby-lsp VS Code extension has been removed, deleting the project's configuration and source files. This includes the removal of the main extension entry point (extension.ts), the test suite infrastructure (runTest.ts, suite/index.ts, extension.test.ts), and supporting configuration files such as .eslintrc.json, tsconfig.json, .yarnrc, and .vscode/settings.json. The CHANGELOG.md, README.md, LICENSE, and vsc-extension-quickstart.md files were also deleted, effectively stripping the extension directory of its initial implementation and documentation.
_features/vscode\extension · high confidence
Removal of the Ruby::LSP::Cli module
The \lib/ruby/lsp/cli.rb\ file has been removed, eliminating the \Ruby::LSP::Cli\ module and its \start\ method. This removes the previous CLI entry point that simply printed "Hello, world", indicating a cleanup of the initial boilerplate or a shift in how the LSP server is invoked.
lib/ruby/lsp · high confidence
Architecture
Introduce new core indexing and server architecture components
This change introduces several foundational classes that restructure how the Ruby LSP handles indexing, type inference, and server communication. The \RubyIndexer::Entry\ class now serves as the base for representing code elements (classes, modules, constants), tracking their visibility, location, and associated comments. A new \TypeInferrer\ component allows the LSP to guess receiver types for method calls based on literal values and context, improving completion and hover accuracy without external type systems. The \Server\ class centralizes request processing, mapping LSP methods to handlers and managing addon loading and error reporting. Additionally, \SemanticHighlighting\ and \ResponseBuilders\ are introduced to manage the construction and encoding of semantic token responses, while \Utils\ provides shared constants and message formatting helpers. These components collectively replace previous ad-hoc implementations with a more modular and maintainable architecture.
ruby-lsp · high confidence
Refactor LSP requests into a listener-based architecture
The Ruby LSP has migrated from a monolithic request handler structure to a new listener-based architecture. This change introduces dedicated listener classes in lib/ruby\_lsp/listeners for core features including code lens, completion, definition, document highlighting, document links, document symbols, folding ranges, hover, inlay hints, and semantic highlighting. By decoupling request logic from the listener pattern, the system now processes AST events through specialized handlers, improving modularity and maintainability of language server capabilities.
_lib/ruby\lsp/listeners · high confidence
Behavioural changes
Adopts new response builder pattern for LSP features
The Ruby LSP has replaced the previous Listener-based architecture with a new Response Builder pattern. This change introduces dedicated builder classes for managing hover content, document symbols, signature help, and test collections, allowing for more structured and incremental construction of LSP responses. Users benefit from a more robust internal structure that supports features like categorized hover content and improved test code lens generation.
_lib/ruby\_lsp/response\builders · high confidence
Enable Sorbet with Prism parser and RBS support
Sorbet is now configured to use the Prism parser and includes experimental support for RBS comments and requires\_ancestor. The configuration also sets up a dedicated cache directory and ignores specific directories like vendor, tmp, and test fixtures to streamline type checking.
sorbet · high confidence
Introduce RubyIndexer as a Prism-based indexing engine
The Ruby indexer has been rebuilt from the ground up to use the Prism parser instead of the previous AST-based approach. This new engine introduces a \DeclarationListener\ to process Ruby source files, an \RBSIndexer\ to index core library signatures, and a \PrefixTree\ for fast autocomplete lookups. It also adds a new \Configuration\ class to manage which gems and file patterns are indexed, and uses \URI::Generic\ to track file locations, improving accuracy for features like go-to-definition and references.
_lib/ruby\indexer/lib · high confidence
Introduce dedicated test reporters for Minitest and Test::Unit
The test reporting infrastructure has been reorganized into a dedicated \lib/ruby\_lsp/test\_reporters\ directory, introducing new \MinitestReporter\ and \TestUnitReporter\ classes that replace previous inline implementations. These reporters now communicate with the VS Code extension via a TCP socket (with port discovery via a temporary JSON database) instead of environment variables, ensuring reliable delivery of test start, pass, fail, skip, and error events. The Minitest reporter also adds color-coded output to the terminal and prevents other gems from mutating the reporter list, while the Test::Unit reporter ensures the final summary is printed and handles coverage data exclusion for non-workspace files.
_lib/ruby\_lsp/test\reporters · high confidence
Introduce new version manager support and standardized activation
The Ruby extension now supports additional version managers (ASDF, Mise, rv) and introduces new activation modes (None, Custom) alongside a refactored, standardized activation flow. Users can now configure custom Ruby commands via the \customRubyCommand\ setting, and the extension provides improved fallback behavior when a requested Ruby version is missing. The activation process has been standardized to use a shared base class, ensuring consistent environment handling across all managers, while specific managers like Shadowenv now explicitly prevent mutating the \BUNDLE\_GEMFILE\ environment variable.
vscode/src/ruby · high confidence
New support utilities for RuboCop diagnostics, code actions, and test items
The \lib/ruby\_lsp/requests/support\ directory now includes several new classes that enhance the LSP experience. \RuboCopDiagnostic\ and \RuboCopRunner\ provide encapsulated handling of RuboCop offenses, mapping RuboCop severities to LSP levels, generating code actions for autocorrection and line disabling, and reusing Prism parse results to avoid double-parsing. \TestItem\ represents test items for the VS Code Test Explorer, including framework tags in its serialized hash output. \Annotation\ and \Sorbet\ support detecting Sorbet type annotations by matching call nodes against expected arities and receivers. \PackageURL\ is vendored to parse package URLs, and \SourceURI\ handles custom URIs for gem sources. \Common\ provides shared helpers for range conversion, code lens creation, and constant name extraction.
_lib/ruby\lsp/requests/support · high confidence
Refactor bundle environment composition into dedicated scripts
The bundle environment composition logic has been extracted into new \compose\_bundle.rb\ and \compose\_bundle\_windows.rb\ scripts. These scripts now handle parsing the initialize request, determining the workspace path, and writing the resulting environment variables to \.ruby-lsp/bundle\_env\, with the Windows variant specifically supporting a \--beta\ flag to install beta server versions.
_lib/ruby\lsp/scripts · high confidence
Regenerated Sorbet RBI type definitions for development gems
The Sorbet RBI files in \sorbet/rbi/gems\ have been regenerated to reflect the current state of development dependencies, including \ast\, \benchmark\, \date\, \erb\, \erubi\, \json\, \language\_server-protocol\, \lint\_roller\, \logger\, and \minitest\. This update ensures that static type checking aligns with the latest gem versions and API signatures used in the project.
sorbet/rbi/gems · high confidence
Ruby LSP requests restructured to use the Listener pattern
The Ruby LSP request handlers in lib/ruby\_lsp/requests have been refactored to delegate analysis logic to dedicated Listener classes. This change decouples request orchestration from AST traversal, allowing Addons to inject custom behavior via listener hooks and enabling more efficient, incremental processing for features like completion, hover, and code actions.
_lib/ruby\lsp/requests · high confidence
RubyIndexer module restructured with new internal components
The RubyIndexer module has been reorganized to expose a cleaner public API by requiring a specific set of internal components. This change introduces support for URI-based resource handling, visibility scopes, and a new declaration listener pattern for indexing. It also integrates RBS-based indexing for core classes, enhances search capabilities with fuzzy matching, and allows for indexing enhancements through included hooks, providing a more robust foundation for code navigation and analysis.
_lib/ruby\indexer · high confidence
Simplified library entry point and strict typing
The main library entry point (lib/ruby-lsp.rb) has been refactored to use strict typing (typed: true) and now directly defines the RubyLsp module with its version, removing the previous dependency on the internal lib/ruby/lsp.rb file which has been deleted. This change streamlines the public API surface by eliminating an intermediate require path.
lib · high confidence
Updated test runner and added CI label validation
The \bin/test\ script now supports running specific tests by name when two arguments are provided, while maintaining backward compatibility for other invocations. A new \bin/check\_labels\ script enforces that pull requests include required change-type and category labels for release notes. Additionally, binstubs for \minitest\, \rdbg\, and \tapioca\ have been added, while obsolete scripts for packaging the VS Code extension and running style checks have been removed.
bin · high confidence
VS Code extension project structure and tooling modernization
The VS Code extension project has been reorganized and its tooling updated to modern standards. The extension directory has been consolidated, moving configuration files like \.vscodeignore\ into the \vscode\ root. Development tooling now uses \pnpm\ (evidenced by \.npmrc\ and \pnpm-lock.yaml\ in ignore lists), a new \eslint.config.mjs\ (flat config), and \@vscode/test-cli\ for test execution (\.vscode-test.mjs\). The TypeScript configuration (\tsconfig.json\) has been updated to use \node16\ module resolution and ES2020 targets. Additionally, the extension now includes a \LICENSE.txt\ and an updated \README.md\ that documents new features like the GitHub Copilot chat agent and expanded version manager support.
vscode · high confidence
Fixes
2 commits (2 fixes) fixing jekyll/\_sass
A fix in jekyll/\_sass — 2 commits (2 fixs), 1 file.
_jekyll/\sass · medium confidence · unverified
Test coverage
Added Ruby source code fixtures for language server tests; Added comprehensive test coverage for core Ruby LSP components; Added document highlight expectation tests for various language constructs; Added expectation-based tests for LSP request handlers; Added formatting expectation tests for Ruby code; Added integration tests for VS Code extension components; Added test coverage for RubyIndexer components; Added test infrastructure and coverage for semantic tokens, expectations, and Sorbet annotations; Added tests for RuboCop cops enforcing alias usage and listener-handler alignment; Added tests for Ruby LSP test reporters; Added tests for the TestCollection response builder.
Dependencies
Ruby LSP v0.26.11 release with major dependency upgrades and VS Code extension consolidation
This release updates the Ruby LSP gem to version 0.26.11, introducing significant dependency upgrades including Minitest 6, Bundler 4, Prism 1.9, and Sorbet 0.6. The VS Code extension is consolidated into the main repository (removing the separate \features/vscode\_extension\ directory) and updated to version 0.10.6, requiring VS Code 1.138.0 and migrating to pnpm for package management. The extension now includes a Ruby Copilot chat agent, a new 'Go to relevant file' command, and a 'Profile current file' command. The gemspec is updated to require Ruby 3.0+ and explicitly lists runtime dependencies on Prism, RBS, and the Language Server Protocol.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 58 → 60 (+1.4)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 90 → 89 (-1.1)
- Maturity 66 → 70 (+3.4)
- Readiness 47 → 47 (+0.0)
- Security 60 → 64 (+3.9)
- Performance 100 → 100 (+0.0)
Resolved (7)
- Documentation: no installation or build instructions (README.md)
- Documentation: no project overview (README.md)
- Documentation: no usage examples (README.md)
- High CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- High CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Inconsistent naming for position lookup operations. Document uses find_index_by_position (implying byte index or array index) with two arguments, while the specialized scanners use find_char_position (implying character count) with one argument. This creates confusion about whether the API returns byte offsets or character counts, and why the method names differ between the high-level document object and its internal scanner components.
- Off-boarding risk: anonymized user #1
New (11)
- Documentation: no build, run or usage example (README.md)
- Further sole-owners (lower concentration)
- High CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- High CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Medium CVE: [GHSA redacted] (vscode/pnpm-lock.yaml)
- Off-boarding risk: anonymized user #1
- redundant comment (vscode/src/client.ts)
- redundant comment (vscode/src/client.ts)
Changes since last survey
- 16 commits — 15 feature/other, 1 fixes
By area
- (repo) — 6 commits
- vscode/src — 3 commits
- .github/workflows — 2 commits
- test/fixtures — 2 commits
- jekyll/Gemfile.lock — 1 commit
- lib/ruby_lsp — 1 commit
- vscode/package.json — 1 commit
Notable commits
- fix: Fix rv run syntax (#4246)
- change: Bump csv from 3.3.6 to 3.3.7 in /jekyll in the minor-and-patch group
- change: Bump extension version to v0.10.8
- change: Bump ruby/setup-ruby from 1.329.0 to 1.334.0
- change: Bump ruby/setup-ruby from 1.334.0 to 1.336.0
- change: Bump test/fixtures/prism from 990ebbf to e272736
- change: Bump test/fixtures/prism from e272736 to ca15cb3
- change: Merge pull request #4225 from Shopify/codex/check-labels-rest-api
- change: Merge pull request #4250 from Shopify/dependabot/submodules/test/fixtures/prism-e272736
- change: Merge pull request #4251 from Shopify/dependabot/github_actions/ruby/setup-ruby-1.334.0
- change: Merge pull request #4255 from Shopify/dependabot/submodules/test/fixtures/prism-ca15cb3
- change: Merge pull request #4256 from Shopify/dependabot/github_actions/ruby/setup-ruby-1.336.0
- change: Merge pull request #4257 from Shopify/dependabot/bundler/jekyll/minor-and-patch-3193c7d5a5
- change: Replace rv ruby run command with rv run (#4204)
- change: Support "on type formatting" in Zed (#4133)
- change: Use the selected chat model for the Ruby design agent (#4193)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
Shopify/ruby-lsp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 13055e305f0768d886209142d2e47c4dc407462e — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.