feat(extras): improve ruby extra by using RubyLsp

Shopify started working on its own LSP
(https://github.com/Shopify/ruby-lsp) and it performs way better than
Solargraph which has a lot of limitations. This paired with sorbet gives
better IntelliSense when navigating the code.

One caveat though is that RubyLsp does not work very well with NeoVim <
0.10 https://github.com/Shopify/ruby-lsp/blob/main/EDITORS.md#neovim
This commit is contained in:
Kevin Robayna 2024-06-17 09:37:34 +01:00
parent 3e29fdf478
commit 4cd5c4162a

View file

@ -11,9 +11,16 @@ return {
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = { opts = {
---@type lspconfig.options
servers = { servers = {
solargraph = {}, -- disable solargraph from auto running when you open ruby files
solargraph = {
autostart = false,
},
-- ruby_lsp will be automatically installed with mason and loaded with lspconfig
ruby_lsp = {},
}, },
}, },
}, },