mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 10:51:36 +00:00
Merge pull request #894 from cramt/add_ruby_lsp_as_ruby_server_option
add ruby lsp as ruby server option
This commit is contained in:
commit
392f737401
2 changed files with 26 additions and 1 deletions
|
@ -387,3 +387,8 @@
|
||||||
- Add missing `right_align` option for existing `renderer.icons` options.
|
- Add missing `right_align` option for existing `renderer.icons` options.
|
||||||
- Add missing `render.icons` options (`hidden_placement`,
|
- Add missing `render.icons` options (`hidden_placement`,
|
||||||
`diagnostics_placement`, and `bookmarks_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
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
inherit (lib.nvim.types) mkGrammarOption diagnostics;
|
||||||
|
inherit (lib.nvim.lua) expToLua;
|
||||||
|
inherit (lib.lists) isList;
|
||||||
inherit (lib.types) either listOf package str enum;
|
inherit (lib.types) either listOf package str enum;
|
||||||
|
|
||||||
cfg = config.vim.languages.ruby;
|
cfg = config.vim.languages.ruby;
|
||||||
|
@ -24,10 +26,28 @@
|
||||||
flags = {
|
flags = {
|
||||||
debounce_text_changes = 150,
|
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
|
# testing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue