Add spell checking of Nix files

This commit is contained in:
Andrew Kvalheim 2022-06-01 10:56:41 -07:00
parent ae0242fc24
commit f0a687ff2b
4 changed files with 8 additions and 2 deletions

View file

@ -266,11 +266,13 @@ in
"cSpell.customDictionaries" = {
custom = { path = ./words.txt; };
custom-css = { path = ./words-css.txt; };
custom-nix = { path = ./words-nix.txt; };
custom-rust = { path = ./words-rust.txt; };
custom-shellscript = { path = ./words-shellscript.txt; };
};
"cSpell.languageSettings" = [
{ languageId = "css"; dictionaries = [ "custom-css" ]; }
{ languageId = "nix"; dictionaries = [ "custom-nix" ]; }
{ languageId = "rust"; dictionaries = [ "custom-rust" ]; }
{ languageId = "shellscript"; dictionaries = [ "custom-shellscript" ]; }
];

4
common/words-nix.txt Normal file
View file

@ -0,0 +1,4 @@
builtins
pkgs
pname
stdenv

View file

@ -74,7 +74,7 @@ in
home.file.".cspell.json".text = lib.mkForce (builtins.toJSON {
dictionaries = [ "custom" ];
dictionaryDefinitions = [ { name = "custom"; path = wordsPath; } ];
enableFiletypes = [ "haml" "ruby" "shellscript" ];
enableFiletypes = [ "haml" "nix" "ruby" "shellscript" ];
});
# Environment

View file

@ -54,6 +54,6 @@ in
home.file.".cspell.json".text = lib.mkForce (builtins.toJSON {
dictionaries = [ "custom" ];
dictionaryDefinitions = [ { name = "custom"; path = wordsPath; } ];
enableFiletypes = [ "haml" "ruby" "shellscript" ];
enableFiletypes = [ "haml" "nix" "ruby" "shellscript" ];
});
}