1
0
Fork 0
forked from autowolf/nix
ashley-nix/modules/neovim/nixcats.nix
2026-02-23 13:08:41 +10:00

177 lines
4.7 KiB
Nix

{inputs, ...}: let
utils = inputs.nixcats.utils;
in {
imports = [
inputs.nixcats.homeModule
];
config = {
# this value, nixCats is the defaultPackageName you pass to mkNixosModules
# it will be the namespace for your options.
nixCats = {
enable = true;
nixpkgs_version = inputs.nixpkgs;
# this will add the overlays from ./overlays and also,
# add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins
# It will not apply to overall system, just nixCats.
addOverlays =
/*
(import ./overlays inputs) ++
*/
[
(utils.standardPluginOverlay inputs)
];
# see the packageDefinitions below.
# This says which of those to install.
packageNames = ["ashleynvim"];
luaPath = "${./.}";
# the .replace vs .merge options are for modules based on existing configurations,
# they refer to how multiple categoryDefinitions get merged together by the module.
# for useage of this section, refer to :h nixCats.flake.outputs.categories
categoryDefinitions.replace = {
pkgs,
settings,
categories,
extra,
name,
mkNvimPlugin,
...
} @ packageDef: {
lspsAndRuntimeDeps = {
general = with pkgs; [
ripgrep
fd
];
treesitter = with pkgs; [
tree-sitter
];
lang = with pkgs; {
lua = [
lua-language-server
];
nix = [
nil
nix-doc
];
};
};
startupPlugins = {
general = with pkgs.vimPlugins; [
lze
plenary-nvim
nvim-notify
nvim-web-devicons
base16-nvim
mini-nvim
];
treesitter = with pkgs.vimPlugins; [
nvim-treesitter-textobjects
nvim-treesitter.withAllGrammars
];
};
optionalPlugins = {
general = with pkgs.vimPlugins; [
];
ui = with pkgs.vimPlugins; [
dressing-nvim
];
qol = with pkgs.vimPlugins; [
undotree
mini-hipatterns
];
telescope = with pkgs.vimPlugins; [
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
];
fyler = with pkgs.vimPlugins; [
fyler-nvim
];
lsp = with pkgs.vimPlugins; [
nvim-lspconfig
];
completion = with pkgs.vimPlugins; [
blink-cmp
nvim-cmp
luasnip
friendly-snippets
cmp_luasnip
cmp-buffer
cmp-path
cmp-nvim-lua
cmp-nvim-lsp
cmp-cmdline
cmp-nvim-lsp-signature-help
cmp-cmdline-history
lspkind-nvim
];
lang = with pkgs.vimPlugins; {
};
};
# shared libraries to be added to LD_LIBRARY_PATH
# variable available to nvim runtime
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
lang = {
};
};
extraWrapperArgs = {
};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {
};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {
};
};
# see :help nixCats.flake.outputs.packageDefinitions
packageDefinitions.replace = {
# these are the names of your packages
# you can include as many as you wish.
ashleynvim = {pkgs, ...}: {
# they contain a settings set defined above
# see :help nixCats.flake.outputs.settings
settings = {
wrapRc = true;
# IMPORTANT:
# your alias may not conflict with your other packages.
aliases = ["ashleyvim" "avim"];
};
# and a set of categories that you want
# (and other information to pass to lua)
categories = {
general = true;
ui = true;
qol = true;
telescope = true;
fyler = true;
lsp = true;
completion = true;
treesitter = true;
lang = {
lua = true;
nix = true;
};
};
};
};
};
};
}