aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/ruby_lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lsp/ruby_lsp.lua')
-rw-r--r--lsp/ruby_lsp.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/lsp/ruby_lsp.lua b/lsp/ruby_lsp.lua
index 87e2f598..23be43e0 100644
--- a/lsp/ruby_lsp.lua
+++ b/lsp/ruby_lsp.lua
@@ -14,7 +14,13 @@
---@type vim.lsp.Config
return {
- cmd = { 'ruby-lsp' },
+ cmd = function(dispatchers, config)
+ return vim.lsp.rpc.start(
+ { 'ruby-lsp' },
+ dispatchers,
+ config and config.root_dir and { cwd = config.cmd_cwd or config.root_dir }
+ )
+ end,
filetypes = { 'ruby', 'eruby' },
root_markers = { 'Gemfile', '.git' },
init_options = {