---
title: "Improving the Developer Experience with the Ruby LSP"
description: "Ruby LSP is a pure-Ruby language server from Shopify that provides editor features for Ruby without type checking or type annotations, aiming for performance and stability on large codebases like Shopify's Core monolith and leaning toward Rails-specific features."
url: "https://swe.quest/articles/improving-the-developer-experience-with-the-ruby-lsp-7b63921832eb2226"
canonical: "https://shopify.engineering/improving-the-developer-experience-with-ruby-lsp"
source: "Shopify Engineering"
published: "2023-02-24"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 16
tags: ["ruby","developer-tools","developer-productivity"]
---

# Improving the Developer Experience with the Ruby LSP

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2023-02-24, 16 min read, Deep dive. Original: [https://shopify.engineering/improving-the-developer-experience-with-ruby-lsp](https://shopify.engineering/improving-the-developer-experience-with-ruby-lsp)

## Summary

Ruby LSP is a pure-Ruby language server from Shopify that provides editor features for Ruby without type checking or type annotations, aiming for performance and stability on large codebases like Shopify's Core monolith and leaning toward Rails-specific features. The post explains how the Language Server Protocol decouples editors from language tooling via JSON over STDIN/STDOUT, and how document synchronization keeps the server's view of open files current. It then walks through implementing a nonpositional Folding Range request by parsing files with the Syntax Tree gem (built on Ripper) and collecting class and method ranges with a visitor. The supported features are listed, and the post notes that YJIT gives a performance boost and that the YARP parser will add portability and error tolerance.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Ruby](https://swe.quest/tags/ruby.md) (Languages)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- Ruby basics ([easy posts on Ruby](https://swe.quest/tags/ruby.md?difficulty=easy))
- abstract syntax trees

## Keywords

Ruby LSP, Language Server Protocol, Syntax Tree, Ripper, YJIT, YARP, RuboCop, VS Code

## Related posts

- [Building a ShopifyQL Code Editor](https://swe.quest/articles/building-a-shopifyql-code-editor-ce9a095d961e0a80.md): Shopify Engineering · 2023-09-11 · Medium · 7 min read · Developer tools, Frontend, TypeScript, Compilers
  Shopify integrated ShopifyQL into the CodeMirror editor by writing an adapter that feeds its existing ANTLR-based, LSP-conforming TypeScript language server into CodeMirror's Lezer parse trees, avoiding a Lezer grammar rewrite.
- [Postgres Language Server: Initial Release](https://swe.quest/articles/postgres-language-server-initial-release-4b7148c84b3bcff0.md): Supabase · 2025-03-29 · Medium · 13 min read · PostgreSQL, Developer tools, Rust, SQL, Static analysis
  Postgres Language Server is an LSP implementation for Postgres offering autocompletion, syntax error highlighting, type-checking via PREPARE/EXPLAIN against a live database, and a Squawk-inspired linter, available for VSCode, Neovim and as a CLI.
- [Enabling low-latency, syntax-aware editing using Tree-sitter](https://swe.quest/articles/enabling-low-latency-syntax-aware-editing-using-tree-sitter-9ffe8225d976568b.md): Zed · 2023-03-27 · Medium · 10 min read · Developer tools, Compilers, Data structures, Rust
  Zed builds its syntax-aware features on Tree-sitter, a GLR-based incremental parsing framework with error recovery that produces concrete syntax trees.
- [Try Out YJIT for Faster Rubying](https://swe.quest/articles/try-out-yjit-for-faster-rubying-6105453188fbb741.md): Shopify Engineering · 2021-10-15 · Medium · 7 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering
  YJIT, Shopify's just-in-time compiler built into CRuby and slated for Ruby 3.1, compiles frequently used Ruby code to native machine code, speeding up a simple Rails benchmark by 20% or more and a real Shopify web service by about 6% on canary traffic.
- [Ruby 3.2’s YJIT is Production-Ready](https://swe.quest/articles/ruby-3-2-s-yjit-is-production-ready-05f17a68a56ea05c.md): Shopify Engineering · 2023-01-17 · Easy · 10 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering, Rust
  YJIT, Shopify's JIT compiler for CRuby, became production-ready in Ruby 3.2 after a port from C99 to Rust and a cut in memory overhead to about a third of Ruby 3.1 levels.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
