blob: bc3ff866f401408367c7074603256bd2b9b52e62 (
plain) (
tree)
|
|
{
config,
options,
lib,
pkgs,
...
}: let
nvimConf = config.modules.desktop.apps.editors.neovim;
configDir = config.nixosConfig.configDir;
in {
options.modules.desktop.apps.editors.neovim = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf (nvimConf.enable) {
modules.desktop.defaultApplications.apps.editor = rec {
package = pkgs.neovim;
install = false;
cmd = "${package}/bin/nvim";
desktop = "nvim";
};
home.packages = [
pkgs.ccls
pkgs.nodePackages.bash-language-server
pkgs.texlab
pkgs.sumneko-lua-language-server
];
home.manager.programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
withNodeJs = true;
extraConfig = ''
luafile /etc/nixos/config/nvim/lua/settings.lua
luafile /etc/nixos/config/nvim/lua/lsp.lua
'';
plugins = with pkgs.vimPlugins; [
nvim-web-devicons
gitsigns-nvim
nvim-tree-lua
catppuccin-nvim
nvim-lspconfig
nvim-cmp
cmp-cmdline
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-vsnip
cmp-treesitter
vim-nix
vim-vsnip
nvim-treesitter.withAllGrammars
neoformat
bufferline-nvim
lualine-nvim
alpha-nvim
];
};
};
}
|