From 27eedd0db60cccaff8056a6a34feb2ab5c7aafd1 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sat, 20 Apr 2024 18:05:13 +0300 Subject: [PATCH] plugins/spellcheck: use the internal `vim.spellChecking` as enable condition --- modules/plugins/spellcheck/vim-dirtytalk/config.nix | 4 ++-- .../plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/plugins/spellcheck/vim-dirtytalk/config.nix b/modules/plugins/spellcheck/vim-dirtytalk/config.nix index 3057ac1..edfe1c7 100644 --- a/modules/plugins/spellcheck/vim-dirtytalk/config.nix +++ b/modules/plugins/spellcheck/vim-dirtytalk/config.nix @@ -5,9 +5,9 @@ }: let inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAfter; - cfg = config.vim.spellcheck; + cfg = config.vim.spellChecking; in { - config = mkIf cfg.vim-dirtytalk.enable { + config = mkIf (cfg.enable && cfg.programmingWordlist.enable) { vim = { startPlugins = ["vim-dirtytalk"]; diff --git a/modules/plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix b/modules/plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix index b7c59b5..d996fef 100644 --- a/modules/plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix +++ b/modules/plugins/spellcheck/vim-dirtytalk/vim-dirtytalk.nix @@ -1,7 +1,7 @@ {lib, ...}: let - inherit (lib.options) mkEnableOption; + inherit (lib.modules) mkAliasOptionModule; in { - options.vim.spellcheck.vim-dirtytalk = { - enable = mkEnableOption "vim-dirtytalk, a wordlist for programmers, that includes programming words"; - }; + imports = [ + (mkAliasOptionModule ["vim" "spellcheck" "vim-dirtytalk" "enable"] ["vim" "spellChecking" "programmingWordlist" "enable"]) + ]; }