plugins/spellcheck: use the internal `vim.spellChecking` as enable condition

This commit is contained in:
NotAShelf 2024-04-20 18:05:13 +03:00
parent f3817fb4b2
commit 27eedd0db6
No known key found for this signature in database
GPG Key ID: 02D1DD3FA08B6B29
2 changed files with 6 additions and 6 deletions

View File

@ -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"];

View File

@ -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"])
];
}