Language Server Protocol
Solargraph supports the language server protocol as of gem version 0.18.0. The VSCode extension uses LSP as of extension version 0.14.0.
Using the Language Server
solargraph stdio to use the language server via stdio.
solargraph socket to use the language server via TCP socket. The default port is 7658.
- Signature help
- Document symbols
- Workspace symbols
- Rename symbols
- Diagnostics (linting)
Work in Progress
- On type formatting
Solargraph's language server extends the protocol with additional methods for inline document pages.
Linting and Formatting
Solargraph uses RuboCop for linting and formatting.
A .solargraph.yml file can be used to select which diagnostics reporters Solargraph should use. Example:
reporters: - rubocop - require_not_found
rubocop enables RuboCop linting. Its rules can be configured in a .rubocop.yml file.
require calls where Solargraph could not resolve a required path. Note that this error does not
necessarily mean that the path is incorrect; only that Solargraph was unable to recognize it.
solargraph reporters for a list of available reporters.