modules: move vim-dirtytalk to plugins/spellcheck

This commit is contained in:
raf 2024-04-14 14:41:10 +03:00
commit b4384a833f
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
7 changed files with 48 additions and 8 deletions

View file

@ -0,0 +1,5 @@
{
imports = [
./vim-dirtytalk
];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.spellcheck;
in {
config = mkIf cfg.vim-dirtytalk.enable {
vim = {
startPlugins = ["vim-dirtytalk"];
# vim-dirtytalk doesn't have any setup
# but we would like to append programming to spelllang
# as soon as possible while the plugin is enabled
luaConfigRC.vim-dirtytalk = entryAfter ["basic"] ''
-- append programming to spelllang
vim.opt.spelllang:append("programming")
'';
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./vim-dirtytalk.nix
];
}

View file

@ -0,0 +1,7 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.spellcheck.vim-dirtytalk = {
enable = mkEnableOption "vim-dirtytalk, a wordlist for programmers, that includes programming words";
};
}