A Ruby Language Server

Implementing the Language Server

Solargraph uses the Language Server Protocol to provide intellisense features to compatible editors. This page provides documentation to help developers implement their own integrations of the language server.

Running the Server

Run solargraph stdio to use the language server via stdio.

Run solargraph socket to use the language server via TCP socket. The default port is 7658.

For best results, the server should be started with the workspace folder as the current working directory.

Supported Capabilities

Work in Progress

Custom Features

Solargraph adds several custom methods to the language server protocol. The method names start with $/ so clients that don’t support them can safely ignore them.

Methods for inline document pages:

Methods to perform maintenance, troubleshooting and workspace-related tasks:


Solargraph uses RuboCop for linting and formatting. It also provides a rubocop reporter for diagnostics.

See Configuration for more information about diagnostics reporters.

Working Implementations

Here are some Solargraph extensions and plugins that developers can use as reference for their own implementations.