feat(nvim): add elixir tools nvim

This commit is contained in:
Moritz Böhme 2024-12-14 22:53:54 +01:00
parent 4084371ab9
commit f5c9c70b08
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -5,6 +5,34 @@ let
in
{
home-manager.users.moritz.programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [
elixir-tools-nvim
];
extraConfigLuaPost = ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
elixir.setup {
nextls = {
enable = true,
},
elixirls = {
enable = true,
cmd = vim.fn.exepath("elixir-ls"),
settings = elixirls.settings {
dialyzerEnabled = true,
enableTestLenses = true,
},
on_attach = function(client, bufnr)
vim.keymap.set("n", "<localleader>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("n", "<localleader>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
vim.keymap.set("v", "<localleader>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
end,
},
}
'';
plugins.lsp = {
enable = true;
inlayHints = true;
@ -12,9 +40,8 @@ in
enable = true;
installRustc = false;
installCargo = false;
settings.files.watcher = "server";
};
servers.elixirls.enable = true;
servers.nextls.enable = true;
servers.nil_ls.enable = true;
servers.nixd.enable = true;
servers.nixd.extraOptions.settings.nixd = {