2024-01-16 12:37:50 +01:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
2022-07-15 13:11:54 +02:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
2023-03-04 13:22:48 +01:00
|
|
|
cfg = config.my.programs.nvim;
|
2022-07-15 13:11:54 +02:00
|
|
|
in
|
|
|
|
{
|
2023-09-10 13:30:29 +02:00
|
|
|
imports = lib.my.listModulesRec ./plugins;
|
2023-06-10 21:52:57 +02:00
|
|
|
|
2023-09-17 09:35:10 +02:00
|
|
|
options.my.programs.nvim.enable = mkEnableOption "nvim";
|
2022-07-15 13:11:54 +02:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-02-12 10:10:32 +01:00
|
|
|
my.nixpkgs.overlays = [
|
|
|
|
(
|
|
|
|
_: prev:
|
|
|
|
with lib.my;
|
|
|
|
{
|
|
|
|
vimPlugins = prev.vimPlugins // {
|
|
|
|
# HACK: to fix error in nixpkgs version of nvim-lspconfig
|
|
|
|
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
|
|
|
version = mkVersionInput inputs.nvim-lspconfig;
|
|
|
|
src = inputs.nvim-lspconfig;
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
|
|
|
];
|
|
|
|
home-manager.users.moritz = {
|
2024-02-10 18:22:09 +01:00
|
|
|
xdg.configFile."nvim/snippets" = {
|
|
|
|
recursive = true;
|
|
|
|
source = ./plugins/snippets;
|
|
|
|
};
|
|
|
|
|
2023-03-02 09:13:46 +01:00
|
|
|
programs.neovim = {
|
|
|
|
enable = true;
|
2024-01-16 12:37:50 +01:00
|
|
|
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
2023-03-02 09:13:46 +01:00
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
withNodeJs = true;
|
|
|
|
withPython3 = true;
|
2023-07-24 18:44:03 +02:00
|
|
|
extraPackages = with pkgs;
|
|
|
|
[
|
|
|
|
alejandra
|
2023-10-08 13:32:42 +02:00
|
|
|
checkmake
|
2023-11-03 13:48:47 +01:00
|
|
|
codespell
|
2023-07-24 18:44:03 +02:00
|
|
|
deadnix
|
2023-10-08 13:32:42 +02:00
|
|
|
dotenv-linter
|
|
|
|
fish
|
2023-07-24 18:44:03 +02:00
|
|
|
jq
|
2023-10-25 17:22:14 +02:00
|
|
|
nil
|
2023-09-27 13:11:07 +02:00
|
|
|
nixd
|
2023-07-24 18:44:03 +02:00
|
|
|
nixpkgs-fmt
|
|
|
|
nodePackages.bash-language-server
|
2023-10-08 13:32:42 +02:00
|
|
|
nodePackages.jsonlint
|
2023-07-24 18:44:03 +02:00
|
|
|
shellcheck
|
|
|
|
shfmt
|
|
|
|
statix
|
|
|
|
taplo
|
2024-01-30 21:42:54 +01:00
|
|
|
stable.yamlfix
|
2023-10-08 13:32:42 +02:00
|
|
|
yamllint
|
2023-07-24 18:44:03 +02:00
|
|
|
];
|
2023-09-17 09:35:10 +02:00
|
|
|
extraLuaConfig = readFile ./options.lua;
|
|
|
|
lazy.enable = true;
|
2023-03-02 09:13:46 +01:00
|
|
|
};
|
2022-07-15 13:11:54 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|