diff --git a/lua/plugins/ruby.lua b/lua/plugins/ruby.lua index fe55723..46b3b20 100644 --- a/lua/plugins/ruby.lua +++ b/lua/plugins/ruby.lua @@ -4,9 +4,14 @@ return { opts = { servers = { ruby_lsp = { - cmd_env = { - BUNDLE_GEMFILE = vim.fn.expand("~/.config/nvim/ruby-lsp-bundle/Gemfile"), - }, + cmd = function(dispatchers, config) + return vim.lsp.rpc.start({ "ruby-lsp" }, dispatchers, { + cwd = config and (config.cmd_cwd or config.root_dir), + env = { + BUNDLE_GEMFILE = vim.fn.expand("~/.config/nvim/ruby-lsp-bundle/Gemfile"), + }, + }) + end, }, }, }, diff --git a/ruby-lsp-bundle/Gemfile b/ruby-lsp-bundle/Gemfile index 19b2c91..20b4d4a 100644 --- a/ruby-lsp-bundle/Gemfile +++ b/ruby-lsp-bundle/Gemfile @@ -1 +1 @@ -source "https://rubygems.org" +source 'https://rubygems.org'