From 13416f0cdff9b06e390f55c970067945ea11e073 Mon Sep 17 00:00:00 2001 From: yavko Date: Thu, 10 Aug 2023 14:48:18 +0300 Subject: [PATCH] style(spell): apply suggestions --- modules/basic/config.nix | 5 +---- modules/basic/module.nix | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/basic/config.nix b/modules/basic/config.nix index 526285e8..f85da799 100644 --- a/modules/basic/config.nix +++ b/modules/basic/config.nix @@ -8,10 +8,7 @@ with builtins; let cfg = config.vim; in { config = { - vim.startPlugins = - if cfg.spellChecking.enableProgrammingWordList - then ["plenary-nvim" "vim-dirtytalk"] - else ["plenary-nvim"]; + vim.startPlugins = ["plenary-nvim"] ++ lib.optionals (cfg.spellChecking.enableProgrammingWordList) ["vim-dirtytalk"]; vim.maps.normal = mkIf cfg.disableArrows { diff --git a/modules/basic/module.nix b/modules/basic/module.nix index ff37cf85..553ee158 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -31,12 +31,12 @@ with builtins; { spellChecking = { enable = mkEnableOption "neovim's built-in spellchecking"; - enableProgrammingWordList = mkEnableOption "adds vim-dirtytalk, a wordlist for programmers, that includes programming words"; + enableProgrammingWordList = mkEnableOption "vim-dirtytalk, a wordlist for programmers, that includes programming words"; languages = mkOption { - type = types.listOf types.str; + type = with types; listOf str; description = "The languages to be used for spellchecking"; - default = ["en_US"]; - example = ["en_US" "de"]; + default = ["en"]; + example = ["en" "de"]; }; };