mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
apply review suggestions
This commit is contained in:
parent
94e6f49b78
commit
62292777f1
1 changed files with 13 additions and 13 deletions
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf mkRenamedOptionModule;
|
inherit (lib.modules) mkIf mkRenamedOptionModule;
|
||||||
inherit (lib.options) mkOption mkEnableOption literalExpression literalMD;
|
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||||
inherit (lib.strings) concatStringsSep;
|
inherit (lib.strings) concatStringsSep;
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
inherit (lib.types) listOf str attrsOf;
|
inherit (lib.types) listOf str attrsOf;
|
||||||
|
@ -27,10 +27,9 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
A list of languages that should be used for spellchecking.
|
A list of languages that should be used for spellchecking.
|
||||||
|
|
||||||
To add your own language files, you may place your `spell`
|
To add your own language files, you may place your `spell` directory in either
|
||||||
directory in either {file}`~/.config/nvim` or the
|
{file}`$XDG_CONFIG_HOME/nvf` or in a path that is included in the
|
||||||
[additionalRuntimePaths](#opt-vim.additionalRuntimePaths)
|
[additionalRuntimePaths](#opt-vim.additionalRuntimePaths) list provided by nvf.
|
||||||
directory provided by nvf.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,15 +38,15 @@ in {
|
||||||
default = {"en.utf-8" = ["nvf" "word_you_want_to_add"];};
|
default = {"en.utf-8" = ["nvf" "word_you_want_to_add"];};
|
||||||
example = literalExpression ''{"en.utf-8" = ["nvf" "word_you_want_to_add"];}'';
|
example = literalExpression ''{"en.utf-8" = ["nvf" "word_you_want_to_add"];}'';
|
||||||
description = ''
|
description = ''
|
||||||
Additional words to be used for spellchecking. The names of each key
|
Additional words to be used for spellchecking. The names of each key will be
|
||||||
will be used as the language code for the spell file. E.g:
|
used as the language code for the spell file. For example
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
"en.utf-8" = [ ... ];
|
"en.utf-8" = [ ... ];
|
||||||
```
|
```
|
||||||
|
|
||||||
will result in `en.utf-8.add.spl` being added to Neovim's runtime
|
will result in `en.utf-8.add.spl` being added to Neovim's runtime in the
|
||||||
in the `after/spell` <directory. Spellwords added here will be loaded
|
`after/spell` <directory. Spellwords added in `after/spell` will be loaded
|
||||||
after all spell directories provided by plugins and those placed in
|
after all spell directories provided by plugins and those placed in
|
||||||
{file}`$XDG_CONFIG_HOME/nvf/spell`.
|
{file}`$XDG_CONFIG_HOME/nvf/spell`.
|
||||||
|
|
||||||
|
@ -108,7 +107,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
compileJoinedSpellfiles =
|
compileJoinedSpellfiles =
|
||||||
pkgs.runCommand "nvf-compile-spellfiles" {
|
pkgs.runCommandLocal "nvf-compile-spellfiles" {
|
||||||
nativeBuildInputs = [config.vim.package];
|
nativeBuildInputs = [config.vim.package];
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/after/spell
|
mkdir -p $out/after/spell
|
||||||
|
@ -126,9 +125,10 @@ in {
|
||||||
ls -lah $out/after/spell
|
ls -lah $out/after/spell
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
in [
|
in
|
||||||
compileJoinedSpellfiles.outPath
|
mkIf (cfg.extraSpellFiles != {}) [
|
||||||
];
|
compileJoinedSpellfiles.outPath
|
||||||
|
];
|
||||||
|
|
||||||
luaConfigRC.spellcheck = entryAfter ["basic"] ''
|
luaConfigRC.spellcheck = entryAfter ["basic"] ''
|
||||||
vim.opt.spell = true
|
vim.opt.spell = true
|
||||||
|
|
Loading…
Reference in a new issue