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