# TODO: look into changing to this: # https://github.com/BirdeeHub/nix-wrapper-modules { inputs, mpkgs, ... }: let inherit (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-unstable; # 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 = ["auroranvim"]; 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 = with pkgs; { general = [ ripgrep fd ]; treesitter = [ tree-sitter ]; lang = { lua = { lsp = [lua-language-server]; format = [stylua]; }; nix = { lsp = [nil]; format = [alejandra]; docs = [nix-doc]; # TODO: i forgot how to integrate this into neovim }; rust = { lsp = [cargo mpkgs.rust-analyzer]; # nightly rustfmt has nicer features :3 format = [inputs.fenix.packages.${system}.complete.rustfmt]; }; zig = { lsp = [zls]; # TODO: needs formatter field }; elixir = { lsp = [elixir-ls]; # TODO: needs formatter field }; gleam = { lsp = [gleam]; # TODO: needs formatter field }; haskell = { lsp = [haskell-language-server]; format = [ormolu]; }; java = { lsp = [ jdt-language-server javaPackages.compiler.openjdk17 javaPackages.compiler.openjdk21 ]; # TODO: needs formatter field }; protobuf = { lsp = [protols]; format = [buf]; }; toml = { format = [taplo]; }; bash = { lsp = [bash-language-server]; }; }; }; startupPlugins = with pkgs.vimPlugins; { general = [ lze plenary-nvim nvim-notify nvim-web-devicons base16-nvim mini-nvim ]; treesitter = [ nvim-treesitter-textobjects nvim-treesitter.withAllGrammars ]; }; optionalPlugins = with pkgs.vimPlugins; { general = []; ui = [ dressing-nvim ]; qol = [ undotree mini-hipatterns ]; telescope = [ telescope-nvim telescope-fzf-native-nvim telescope-ui-select-nvim ]; fyler = [ fyler-nvim ]; lsp = [ nvim-lspconfig ]; completion = [ 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 ]; format = [ conform-nvim ]; comment = [ comment-nvim ]; git = [ resolve-nvim vim-fugitive ]; lang = { java = [ nvim-jdtls ]; }; }; # shared libraries to be added to LD_LIBRARY_PATH # variable available to nvim runtime sharedLibraries = { general = with pkgs; [ # libgit2 ]; }; environmentVariables = { lang = { rust.lsp = { # it literally won't see the rust-analyzer provided to it # if you don't use an envrionment variable to tell it RUST_ANALYZER_CMD = "${mpkgs.rust-analyzer}/bin/rust-analyzer"; }; elixir.lsp = { ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh"; }; java.lsp = { JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}"; OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}"; OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}"; }; }; }; 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 :!-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. auroranvim = {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 = [ "auravim" "foxyvim" "avix" "fvix" ]; }; # 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; format = true; comment = true; git = false; # not really setup yet lang = { lua.lsp = true; lua.format = true; nix.lsp = true; nix.format = true; nix.docs = true; rust.lsp = true; rust.format = true; zig.lsp = true; zig.format = true; elixir.lsp = true; elixir.format = true; gleam.lsp = true; gleam.format = true; haskell.lsp = true; haskell.format = true; java.lsp = true; java.format = true; protobuf.lsp = true; protobuf.format = true; toml.format = true; bash.lsp = true; }; }; }; }; }; }; }