Skip to content

Commit

Permalink
Back to using ruby_lsp sans Mason
Browse files Browse the repository at this point in the history
- The problem apparently is that Mason does not play nicely with version
managers like asdf, rbenv, etc.
- On an initial Ruby version, it will work fine. But install a new
version of Ruby, and Mason will still try to run ruby_lsp using the old
version.
- Shopify/ruby-lsp#2347
-
ogirginc/dotfiles@2d83daa
- https://github.com/Shopify/ruby-lsp/blob/main/EDITORS.md
  • Loading branch information
joshukraine committed Jul 26, 2024
1 parent ee61383 commit 75fda94
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
1 change: 0 additions & 1 deletion nvim/.config/nvim/lazyvim.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.ruby",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.toml",
Expand Down
5 changes: 0 additions & 5 deletions nvim/.config/nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ vim.opt.listchars:append({ nbsp = "+" })
vim.opt.listchars:append({ precedes = "" })
vim.opt.listchars:append({ tab = "·»" })
vim.opt.listchars:append({ trail = "·" })

-- LSP Server to use for Ruby.
-- https://www.lazyvim.org/extras/lang/ruby
vim.g.lazyvim_ruby_lsp = "ruby_lsp"
vim.g.lazyvim_ruby_formatter = "standardrb"
26 changes: 14 additions & 12 deletions nvim/.config/nvim/lua/plugins/extend-nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ return {
},
signs = true,
},
-- servers = {
-- standardrb = {
-- mason = false,
-- cmd = { "standardrb", "--lsp" },
-- filetypes = { "ruby", "rakefile" },
-- },
-- ruby_ls = {
-- mason = false,
-- cmd = { "ruby-lsp" },
-- formatter = "auto",
-- },
-- },
servers = {
-- https://github.com/Shopify/ruby-lsp/blob/main/EDITORS.md
ruby_lsp = {
mason = false,
cmd = { "/Users/joshukraine/.asdf/shims/ruby-lsp" },
formatter = "auto",
},
-- https://github.com/standardrb/standard
standardrb = {
mason = false,
cmd = { "/Users/joshukraine/.asdf/shims/standardrb", "--lsp" },
filetypes = { "ruby", "rakefile" },
},
},
},
}

0 comments on commit 75fda94

Please sign in to comment.