From 9cc41c7d6e98fd5d687f63438e34b24cc3c038ba Mon Sep 17 00:00:00 2001 From: Fahd Shalhoub Date: Mon, 29 Jun 2026 14:48:02 +0300 Subject: [PATCH] FIX: Ruby LSP for Hungerstation Platform --- lua/plugins/ruby.lua | 11 ++++++++--- ruby-lsp-bundle/Gemfile | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) 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'