2024-09-14 11:05:12 +02:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkIf readFile;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
home-manager.users.moritz.programs.nixvim = {
|
2024-12-14 22:53:54 +01:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
2024-09-14 11:05:12 +02:00
|
|
|
plugins.lsp = {
|
|
|
|
enable = true;
|
|
|
|
inlayHints = true;
|
2024-11-08 20:13:24 +01:00
|
|
|
servers.rust_analyzer = {
|
|
|
|
enable = true;
|
|
|
|
installRustc = false;
|
|
|
|
installCargo = false;
|
2024-12-14 22:53:54 +01:00
|
|
|
settings.files.watcher = "server";
|
2024-11-08 20:13:24 +01:00
|
|
|
};
|
2024-12-15 00:50:16 +01:00
|
|
|
servers.lua_ls.enable = true;
|
2024-10-21 11:19:13 +02:00
|
|
|
servers.nil_ls.enable = true;
|
2024-09-14 11:05:12 +02:00
|
|
|
servers.nixd.enable = true;
|
|
|
|
servers.nixd.extraOptions.settings.nixd = {
|
|
|
|
nixpkgs = {
|
|
|
|
expr = "import <nixpkgs> { }";
|
|
|
|
};
|
|
|
|
options = {
|
|
|
|
nixos = {
|
2024-11-08 19:41:56 +01:00
|
|
|
expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).options'';
|
2024-09-14 11:05:12 +02:00
|
|
|
};
|
|
|
|
"flake-parts" = {
|
|
|
|
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).debug.options'';
|
|
|
|
};
|
|
|
|
"flake-parts2" = {
|
|
|
|
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|