solargraph
solargraph, a language server for Ruby
You can install solargraph via gem install.
gem install --user-install solargraph
Setup
require'lspconfig'.solargraph.setup{}
Default values
cmd = { "solargraph", "stdio" }
filetypes = { "ruby" }
init_options = {
formatting = true
}
root_dir = function(startpath)
return M.search_ancestors(startpath, matcher)
end
settings = {
solargraph = {
diagnostics = true
}
}
Available settings
solargraph.autoformat
- Type:
enum { true, false }
Enable automatic formatting while typing (WARNING\: experimental)
solargraph.bundlerPath
- Type:
string
- Default:
"bundle"
Path to the bundle executable\, defaults to \'bundle\'. Needs to be an absolute path for the \'bundle\' exec\/shim
solargraph.checkGemVersion
- Type:
enum { true, false }
- Default:
true
Automatically check if a new version of the Solargraph gem is available.
solargraph.commandPath
- Type:
string
- Default:
"solargraph"
Path to the solargraph command. Set this to an absolute path to select from multiple installed Ruby versions.
solargraph.completion
- Type:
enum { true, false }
- Default:
true
Enable completion
solargraph.definitions
- Type:
enum { true, false }
- Default:
true
Enable definitions (go to\, etc.)
solargraph.diagnostics
- Type:
enum { true, false }
Enable diagnostics
solargraph.externalServer
- Type:
object
- Default:
{ host = "localhost", port = 7658 }
The host and port to use for external transports. (Ignored for stdio and socket transports.)
solargraph.folding
- Type:
boolean
- Default:
true
Enable folding ranges
solargraph.formatting
- Type:
enum { true, false }
Enable document formatting
solargraph.hover
- Type:
enum { true, false }
- Default:
true
Enable hover
solargraph.logLevel
- Type:
enum { "warn", "info", "debug" }
- Default:
"warn"
Level of debug info to log. `warn` is least and `debug` is most.
solargraph.references
- Type:
enum { true, false }
- Default:
true
Enable finding references
solargraph.rename
- Type:
enum { true, false }
- Default:
true
Enable symbol renaming
solargraph.symbols
- Type:
enum { true, false }
- Default:
true
Enable symbols
solargraph.transport
- Type:
enum { "socket", "stdio", "external" }
- Default:
"socket"
The type of transport to use.
solargraph.useBundler
- Type:
boolean
Use `bundle exec` to run solargraph. (If this is true\, the solargraph.commandPath setting is ignored.)