lsp/presets/solargprah: init

This commit is contained in:
Snoweuph 2026-04-11 16:57:45 +02:00
commit 0ee735f2f9
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.vim.lsp.presets.solargraph;
in {
options.vim.lsp.presets.solargraph = {
enable = mkEnableOption "the Ruby Solargraph Language Server";
};
config = mkIf cfg.enable {
vim.lsp.servers.solargraph = {
enable = true;
cmd = [(getExe pkgs.rubyPackages.solargraph) "stdio"];
root_markers = [".git"];
settings = {
solargraph = {
diagnostics = true;
};
};
flags = {
debounce_text_changes = 150;
};
init_options = {
formatting = true;
};
};
};
}