diff --git a/users/modules/neovim/default.nix b/users/modules/neovim/default.nix index c651ac6..d24acfc 100644 --- a/users/modules/neovim/default.nix +++ b/users/modules/neovim/default.nix @@ -12,6 +12,7 @@ in ./nix.nix ./python.nix ./clangd.nix + ./elixir.nix ]; options.mae.nvim = { diff --git a/users/modules/neovim/elixir.nix b/users/modules/neovim/elixir.nix new file mode 100644 index 0000000..b796d3e --- /dev/null +++ b/users/modules/neovim/elixir.nix @@ -0,0 +1,21 @@ +{ lib, pkgs, config, ... }: +let + cfg = config.mae.nvim.elixir; +in +with lib; +{ + options.mae.nvim.elixir.enable = lib.mkEnableOption "Enable elixir support in neovim"; + + config = mkIf cfg.enable { + mae.nvim.lsp.servers.elixirls = { + enable = true; + script = '' + { + cmd = { "${pkgs.elixir_ls}/bin/elixir-ls" }, + } + ''; + }; + home.packages = with pkgs; [ elixir ]; + programs.neovim.plugins = with pkgs.vimPlugins; [ vim-elixir ]; + }; +} diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index 4ed8581..d806d28 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -10,5 +10,6 @@ go.enable = true; clangd.enable = true; python.enable = true; + elixir.enable = true; }; }