feat: add lazy loading to nvim
This commit is contained in:
parent
6ebfb3d109
commit
752dfc55e8
64 changed files with 68 additions and 1265 deletions
|
|
@ -1,68 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
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,
|
||||
cmd = vim.fn.exepath("nextls"),
|
||||
},
|
||||
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;
|
||||
servers.rust_analyzer = {
|
||||
enable = true;
|
||||
installRustc = false;
|
||||
installCargo = false;
|
||||
settings.files.watcher = "server";
|
||||
};
|
||||
servers.lexical.enable = true;
|
||||
servers.lua_ls.enable = true;
|
||||
servers.nil_ls.enable = true;
|
||||
servers.nixd.enable = true;
|
||||
servers.nixd.extraOptions.settings.nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }";
|
||||
};
|
||||
options = {
|
||||
nixos = {
|
||||
expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).options'';
|
||||
};
|
||||
"flake-parts" = {
|
||||
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).debug.options'';
|
||||
};
|
||||
"flake-parts2" = {
|
||||
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue