dotfiles/modules/programs/nvim/default.nix
2024-06-27 10:12:38 +02:00

58 lines
1.3 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
let
cfg = config.my.programs.nvim;
inherit (lib) mkEnableOption mkIf readFile;
in
{
imports = lib.my.listModulesRec ./plugins;
options.my.programs.nvim.enable = mkEnableOption "nvim";
config = mkIf cfg.enable {
home-manager.users.moritz = {
xdg.configFile."nvim/snippets" = {
recursive = true;
source = ./plugins/snippets;
};
home.packages = with pkgs; [
xdotool
];
programs.neovim = {
enable = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
extraPackages = with pkgs;
[
alejandra
checkmake
codespell
deadnix
dotenv-linter
fish
jq
nil
nixd
nixpkgs-fmt
nodePackages.bash-language-server
python3Packages.python-lsp-server
python3Packages.ruff-lsp
shellcheck
shfmt
stable.yamlfix
statix
taplo
yamllint
];
extraLuaConfig = readFile ./options.lua;
lazy.enable = true;
};
};
};
}