Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,8 @@
- Add missing `right_align` option for existing `renderer.icons` options.
- Add missing `render.icons` options (`hidden_placement`,
`diagnostics_placement`, and `bookmarks_placement`).

[cramt](https://github.com/cramt):

- Add `rubylsp` option in `vim.languages.ruby.lsp.server` to use shopify's
ruby-lsp language server
22 changes: 21 additions & 1 deletion modules/plugins/languages/ruby.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.types) mkGrammarOption diagnostics;
inherit (lib.nvim.lua) expToLua;
inherit (lib.lists) isList;
inherit (lib.types) either listOf package str enum;

cfg = config.vim.languages.ruby;
Expand All @@ -24,10 +26,28 @@
flags = {
debounce_text_changes = 150,
},
cmd = { "${pkgs.solargraph}/bin/solargraph", "stdio" }
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{ "${cfg.lsp.package}/bin/solargraph", "stdio" }''
}
}
'';
};
rubylsp = {
package = pkgs.ruby-lsp;
lspConfig = ''
lspconfig.ruby_lsp.setup {
capabilities = capabilities,
on_attach = default_on_attach,
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{ "${cfg.lsp.package}/bin/ruby-lsp" }''
}
}
'';
}
};

# testing
Expand Down
Loading