mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-21 19:24:25 +02:00
Add sorbet lsp for ruby (#1035)
This commit is contained in:
parent
4d46ee6e58
commit
029e08868a
1 changed files with 18 additions and 16 deletions
|
@ -41,24 +41,26 @@ M.lint = function()
|
|||
end
|
||||
|
||||
M.lsp = function()
|
||||
if require("lv-utils").check_lsp_client_active "solargraph" then
|
||||
return
|
||||
if not require("lv-utils").check_lsp_client_active "sorbet" then
|
||||
require("lspconfig").sorbet.setup {}
|
||||
end
|
||||
|
||||
-- If you are using rvm, make sure to change below configuration
|
||||
require("lspconfig").solargraph.setup {
|
||||
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = O.lang.ruby.diagnostics.virtual_text,
|
||||
signs = O.lang.ruby.diagnostics.signs,
|
||||
underline = O.lang.ruby.diagnostics.underline,
|
||||
update_in_insert = true,
|
||||
}),
|
||||
},
|
||||
filetypes = O.lang.ruby.filetypes,
|
||||
}
|
||||
if not require("lv-utils").check_lsp_client_active "solargraph" then
|
||||
-- If you are using rvm, make sure to change below configuration
|
||||
require("lspconfig").solargraph.setup {
|
||||
cmd = { DATA_PATH .. "/lspinstall/ruby/solargraph/solargraph", "stdio" },
|
||||
on_attach = require("lsp").common_on_attach,
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = O.lang.ruby.diagnostics.virtual_text,
|
||||
signs = O.lang.ruby.diagnostics.signs,
|
||||
underline = O.lang.ruby.diagnostics.underline,
|
||||
update_in_insert = true,
|
||||
}),
|
||||
},
|
||||
filetypes = O.lang.ruby.filetypes,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
M.dap = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue