diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-24 13:26:52 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-06-24 13:26:52 +0200 |
commit | 2e3d85041e93526b200f2739478a685f51133867 (patch) | |
tree | 7f6fd3d7e7553d6b1a0c57d2b343c74a671512c9 | |
parent | modules/nvim/mappings: Remove overlapping <Space>c mapping (diff) | |
download | nixos-config-2e3d85041e93526b200f2739478a685f51133867.zip |
modules/nvim/plgs: Auto-load
-rw-r--r-- | modules/by-name/nv/nvim/module.nix | 23 | ||||
-rw-r--r-- | modules/by-name/nv/nvim/plgs/comment-nvim/default.nix | 1 | ||||
-rw-r--r-- | modules/by-name/nv/nvim/plgs/default.nix | 42 |
3 files changed, 17 insertions, 49 deletions
diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix index 819646d6..817fda70 100644 --- a/modules/by-name/nv/nvim/module.nix +++ b/modules/by-name/nv/nvim/module.nix @@ -12,17 +12,25 @@ lib, config, modules, + libraries, ... }: let cfg = config.soispha.programs.nvim; + + plgs = builtins.attrValues (libraries.extra.mkByName { + useShards = false; + baseDirectory = ./plgs; + fileName = "default.nix"; + }); in { - imports = [ - ./autocmds - ./clipboard - ./mappings - ./options - ./plgs - ]; + imports = + [ + ./autocmds + ./clipboard + ./mappings + ./options + ] + ++ plgs; options.soispha.programs.nvim = { enable = lib.mkEnableOption "custom nvim config"; @@ -43,6 +51,7 @@ in { VISUAL = "nvim"; CODEEDITOR = "nvim"; }; + programs.nixvim = { enable = true; diff --git a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix index b404843e..68a88d32 100644 --- a/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix +++ b/modules/by-name/nv/nvim/plgs/comment-nvim/default.nix @@ -26,6 +26,7 @@ in { }; }; }; + keymaps = [ { key = "gcc"; diff --git a/modules/by-name/nv/nvim/plgs/default.nix b/modules/by-name/nv/nvim/plgs/default.nix deleted file mode 100644 index aaebb3b1..00000000 --- a/modules/by-name/nv/nvim/plgs/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. -{...}: { - imports = - [ - # Plugins not yet packaged in nixpkgs - # ./debugprint - ./lf-nvim - # ./lsp-progress-nvim - ] - ++ [ - # Already packaged in nixpkgs - ./colorscheme - ./comment-nvim - ./femaco - ./flatten-nvim - ./goto-preview - ./harpoon - ./leap - ./lsp - ./lspkind - ./ltex_extra - ./lualine - ./luasnip - ./neorg - ./nvim-cmp - ./nvim-lint - ./raw_plugins - ./telescope - ./todo-comments - ./treesitter - ./vim-tex - ./which-key - ]; -} |