1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 02:20:04 +08:00
SpaceVim/bundle/nvim-lspconfig/lua/lspconfig/server_configurations/solargraph.lua

39 lines
732 B
Lua
Raw Normal View History

local util = require 'lspconfig.util'
2021-10-05 15:13:10 +08:00
local bin_name = 'solargraph'
local cmd = { bin_name, 'stdio' }
2021-10-05 15:13:10 +08:00
if vim.fn.has 'win32' == 1 then
cmd = { 'cmd.exe', '/C', bin_name, 'stdio' }
2021-10-05 15:13:10 +08:00
end
return {
2021-10-05 15:13:10 +08:00
default_config = {
cmd = cmd,
2021-10-05 15:13:10 +08:00
settings = {
solargraph = {
diagnostics = true,
},
},
init_options = { formatting = true },
filetypes = { 'ruby' },
root_dir = util.root_pattern('Gemfile', '.git'),
},
docs = {
description = [[
https://solargraph.org/
solargraph, a language server for Ruby
You can install solargraph via gem install.
```sh
gem install --user-install solargraph
```
]],
default_config = {
root_dir = [[root_pattern("Gemfile", ".git")]],
},
},
}