config-perso/kat/users/neovim/default.nix

39 lines
754 B
Nix
Raw Normal View History

2024-09-26 11:51:04 +02:00
{
pkgs,
config,
lib,
...
}:
with lib;
{
options.kat.neovim = mkEnableOption "neovim configuration" // {
default = true;
};
config = mkIf config.kat.neovim {
programs.neovim = {
enable = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
nvim-treesitter.withAllGrammars
vim-nix
telescope-nvim
todo-comments-nvim
gitsigns-nvim
];
extraPackages = with pkgs; [
git
ripgrep
fd
gcc
];
extraConfig = builtins.readFile ./nvimrc;
extraLuaConfig = builtins.readFile ./nvim.lua;
vimAlias = true;
viAlias = true;
};
};
}