dotfiles/modules/programs/nvim/default.nix
2023-02-17 12:38:44 +01:00

53 lines
1.1 KiB
Nix

{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.programs.vim;
in
{
options.my.programs.vim = {
enable = mkOption {
default = true;
type = types.bool;
example = false;
};
};
config = mkIf cfg.enable {
home-manager.users.moritz.programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
extraLuaConfig = builtins.readFile ./init.lua;
extraPackages = with pkgs; [
sumneko-lua-language-server
nil
];
plugins = with pkgs.vimPlugins; [
catppuccin-nvim
cmp-nvim-lsp
dashboard-nvim
neogit
noice-nvim
nui-nvim # for noice-nvim
nvim-cmp
nvim-lspconfig
nvim-treesitter.withAllGrammars
nvim-web-devicons # for dashboard-nvim
plenary-nvim # for telescope, neogit
telescope-nvim
which-key-nvim
cmp_luasnip
luasnip
lsp_lines-nvim
];
};
};
}