From a9ff6b017e4c35c9fe443673cda9986e2f46fd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Jatu=C5=BEis?= Date: Tue, 21 Jan 2025 16:08:52 +0200 Subject: [PATCH] neovim: rename nvim category to nixCats-small --- flake.lock | 6 +-- pkgs/default.nix | 2 +- profiles/cli/neovim/nixCats.nix | 3 +- profiles/cli/neovim/nvim-nix.nix | 85 -------------------------------- profiles/cli/neovim/plugins.nix | 61 ----------------------- 5 files changed, 6 insertions(+), 151 deletions(-) delete mode 100644 profiles/cli/neovim/nvim-nix.nix delete mode 100644 profiles/cli/neovim/plugins.nix diff --git a/flake.lock b/flake.lock index b10e1796..810bed9e 100644 --- a/flake.lock +++ b/flake.lock @@ -254,11 +254,11 @@ }, "nixCats": { "locked": { - "lastModified": 1737334747, - "narHash": "sha256-3x/fxXDl9iPbQs7p7xbjJ2EHQvmJtXrtqkTBEI1hPKk=", + "lastModified": 1737460174, + "narHash": "sha256-dB2HsnN3/yCu8h8lJ94WJI8XFBjMGBC9gOJ51TegAc4=", "owner": "BirdeeHub", "repo": "nixCats-nvim", - "rev": "c4f1d407e0f8f5cc9a6b390962cc879e2eb1db28", + "rev": "a9d14539739d20bec14e0bbc6315fbb6194a3a31", "type": "github" }, "original": { diff --git a/pkgs/default.nix b/pkgs/default.nix index 4ff6b149..aad0af77 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -85,7 +85,7 @@ kaknix = pkgs.callPackage ./kaknix.nix { }; maimpick = pkgs.callPackage ./maimpick.nix { }; neovim = nixCatsBuilder "nixCats"; - neovim-nix = nixCatsBuilder "nvim"; + neovim-nix = nixCatsBuilder "nixCats-small"; restart-eww = pkgs.callPackage ./restart-eww.nix { }; rofi-powermenu = pkgs.callPackage ./rofi-powermenu.nix { }; sxhkd = pkgs.sxhkd.overrideAttrs (old: { diff --git a/profiles/cli/neovim/nixCats.nix b/profiles/cli/neovim/nixCats.nix index ca24a6e0..052d94a9 100644 --- a/profiles/cli/neovim/nixCats.nix +++ b/profiles/cli/neovim/nixCats.nix @@ -107,10 +107,11 @@ treesitter-small = false; }; }; - nvim = _: { + nixCats-small = _: { # these also recieve our pkgs variable # see :help nixCats.flake.outputs.packageDefinitions settings = { + aliases = [ "nvim" ]; # explained below in the `regularCats` package's definition # OR see :help nixCats.flake.outputs.settings for all of the settings available wrapRc = true; diff --git a/profiles/cli/neovim/nvim-nix.nix b/profiles/cli/neovim/nvim-nix.nix deleted file mode 100644 index ec849799..00000000 --- a/profiles/cli/neovim/nvim-nix.nix +++ /dev/null @@ -1,85 +0,0 @@ -{ - neovimUtils, - wrapNeovimUnstable, - neovim-unwrapped, - vimPlugins, - lib, - nixfmt, - ripgrep, - statix, - deadnix, -}: -let - plugins = - with vimPlugins; - let - telescope-dependencies = [ - plenary-nvim - telescope-nvim - telescope-fzf-native-nvim - ]; - in - [ - ale - commentary - fidget-nvim - fugitive - gitsigns-nvim - lualine-nvim - nvim-web-devicons - neoformat - nordic-nvim - (nvim-treesitter.withPlugins ( - p: with p; [ - bash - c - lua - nix - vim - ] - )) - repeat - vim-suda - surround - vim-polyglot - vim-sneak - vim-unimpaired - vinegar - which-key-nvim - ] - ++ telescope-dependencies; - normalizedPlugins = neovimUtils.normalizePlugins plugins; - moduleConfigure = { - packages.neovim-nix = neovimUtils.normalizedPluginsToVimPackage normalizedPlugins; - beforePlugins = ""; - }; - - neovimConfig = neovimUtils.makeNeovimConfig { - inherit plugins; - withPython3 = false; - withNode = false; - withRuby = false; - configure = moduleConfigure; - luaRcContent = # lua - '' - dofile '${./lua/nvim-treesitter.lua}' - dofile '${./lua/init.lua}' - ''; - }; - extraWrapperArgs = - let - extraPackages = [ - nixfmt - ripgrep - deadnix - statix - ]; - in - ''--suffix PATH : "${lib.makeBinPath extraPackages}"''; -in -wrapNeovimUnstable neovim-unwrapped ( - neovimConfig - // { - wrapperArgs = (lib.escapeShellArgs neovimConfig.wrapperArgs) + " " + extraWrapperArgs; - } -) diff --git a/profiles/cli/neovim/plugins.nix b/profiles/cli/neovim/plugins.nix deleted file mode 100644 index 8e19dab1..00000000 --- a/profiles/cli/neovim/plugins.nix +++ /dev/null @@ -1,61 +0,0 @@ -pkgs: -with pkgs.vimPlugins; -let - telescope-dependencies = [ - plenary-nvim - telescope-nvim - telescope-fzf-native-nvim - ]; - cmp-dependencies = [ - cmp-nvim-lsp - cmp-buffer - cmp-path - cmp-cmdline - nvim-cmp - vim-vsnip - ]; -in -[ - ale - commentary - direnv-vim - fidget-nvim - fugitive - gitsigns-nvim - { - plugin = lualine-nvim; - optional = true; - } - neoformat - nvim-sops - { - plugin = nvim-web-devicons; - optional = true; - } - nordic-nvim - { - plugin = nvim-treesitter.withAllGrammars; - # config = builtins.readFile ./nvim-treesitter.vim; - } - { - plugin = nvim-lspconfig; - # config = builtins.readFile ./lspconfig.vim; - } - { - plugin = playground; - # config = builtins.readFile ./playground.vim; - } - rainbow - repeat - solarized - vim-suda - surround - vim-polyglot - vim-sneak - vim-unimpaired - vinegar - which-key-nvim - yuck-vim -] -++ telescope-dependencies -++ cmp-dependencies