Skip to content

Commit

Permalink
Choose Elixir Language Server
Browse files Browse the repository at this point in the history
There are multiple language servers in the Elixir ecosystem. This will
allow the user to select which they want to use, with the option of
using more than one.
  • Loading branch information
ankhers committed Jun 11, 2024
1 parent a04f29f commit 2630ecd
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions src/modules/languages/elixir.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,34 @@ in
default = pkgs.elixir;
defaultText = lib.literalExpression "pkgs.elixir";
};

languageServer = {
elixir_ls = lib.mkOption {
type = lib.types.bool;
default = true;
defaultText = "true";
description = ''
Enable the ElixirLS language server (https://github.com/elixir-lsp/elixir-ls).
'';
};

lexical = lib.mkOption {
type = lib.types.bool;
default = true;
defaultText = "true";
description = ''
Enable the Lexical language server (https://github.com/lexical-lsp/lexical).
'';
};
};
};

config = lib.mkIf cfg.enable
{
packages = with pkgs; [
cfg.package
elixir_ls
];
]
++ lib.optional cfg.languageServer.elixir_ls elixir-ls
++ lib.optional cfg.languageServer.lexical lexical;
};
}

0 comments on commit 2630ecd

Please sign in to comment.