mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-14 22:47:48 +00:00
modules/neovim: separate options; move package into core/build
This commit is contained in:
parent
4083a74281
commit
199a8b06c5
9 changed files with 258 additions and 211 deletions
23
modules/neovim/spellcheck/default.nix
Normal file
23
modules/neovim/spellcheck/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) concatStringsSep;
|
||||
inherit (lib) optionalString optionals mkIf nvim;
|
||||
|
||||
cfg = config.vim;
|
||||
in {
|
||||
imports = [./options.nix];
|
||||
config = mkIf cfg.spellChecking.enable {
|
||||
vim = {
|
||||
startPlugins = optionals cfg.spellChecking.enableProgrammingWordList ["vim-dirtytalk"];
|
||||
configRC.spellcheck = nvim.dag.entryAfter ["basic"] ''
|
||||
${optionalString cfg.spellChecking.enable ''
|
||||
set spell
|
||||
set spelllang=${concatStringsSep "," cfg.spellChecking.languages}${optionalString cfg.spellChecking.enableProgrammingWordList ",programming"}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue