mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 03:47:37 +00:00
lsp/presets/ruby-lsp: init
This commit is contained in:
parent
7ecf68cb29
commit
78edab7c5f
2 changed files with 28 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
./deno.nix
|
||||
./harper.nix
|
||||
./lemminx.nix
|
||||
./ruby-lsp.nix
|
||||
./sqls.nix
|
||||
./svelte-language-server.nix
|
||||
./tailwindcss-language-server.nix
|
||||
|
|
|
|||
27
modules/plugins/lsp/presets/ruby-lsp.nix
Normal file
27
modules/plugins/lsp/presets/ruby-lsp.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.vim.lsp.presets.ruby-lsp;
|
||||
in {
|
||||
options.vim.lsp.presets.ruby-lsp = {
|
||||
enable = mkEnableOption "the Ruby Language Server";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim.lsp.servers.ruby-lsp = {
|
||||
enable = true;
|
||||
cmd = [(getExe pkgs.ruby-lsp)];
|
||||
root_markers = [".git"];
|
||||
init_options = {
|
||||
formatter = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue