dotfiles/modules/programs/nvim/default.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, inputs, ... }:
2022-07-15 13:11:54 +02:00
let
2024-06-17 09:59:39 +02:00
inherit (lib) mkEnableOption mkIf readFile;
2024-06-30 18:46:10 +02: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
home-manager.users.moritz = {
2024-02-10 18:22:09 +01:00
xdg.configFile."nvim/snippets" = {
recursive = true;
source = ./plugins/snippets;
};
2024-06-27 10:12:38 +02:00
home.packages = with pkgs; [
2024-06-30 18:46:10 +02:00
xdotool # for vimtex
2024-06-27 10:12:38 +02:00
];
2023-03-02 09:13:46 +01:00
programs.neovim = {
enable = true;
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
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
2024-05-13 10:34:19 +02:00
python3Packages.python-lsp-server
2023-07-24 18:44:03 +02:00
shellcheck
shfmt
2024-05-13 10:34:19 +02:00
stable.yamlfix
2023-07-24 18:44:03 +02:00
statix
taplo
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
};
};
}