all repos — nixfiles @ 05dd85210e465caa44ef7254f2781b2d12ba2882

System and user configuration, managed by nix and home-manager

Reformat files with alejandra

Alan Pearce
commit

05dd85210e465caa44ef7254f2781b2d12ba2882

parent

472dbbdbb246cf3d8ce3a5c3c6cefaa07b7589df

1 file changed, 25 insertions(+), 22 deletions(-)

changed files
M user/modules/tabnine.nixuser/modules/tabnine.nix
@@ -1,32 +1,35 @@
-{ config, lib, pkgs, ... }: - -with lib; - -let +{ + config, + lib, + pkgs, + ... +}: +with lib; let inherit (pkgs) stdenv; cfg = config.programs.tabnine; lspConfigFile = config: - pkgs.runCommand "TabNine.toml" - { - buildInputs = [ pkgs.remarshal ]; - preferLocalBuild = true; - allowSubstitutes = false; - } - '' - remarshal -if json -of toml \ - < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \ - | sed -e 's/^\["\(.*\)"\]/[\1]/' \ - > $out - ''; -in -{ - + pkgs.runCommand "TabNine.toml" + { + buildInputs = [pkgs.remarshal]; + preferLocalBuild = true; + allowSubstitutes = false; + } + '' + remarshal -if json -of toml \ + < ${pkgs.writeText "config.json" (builtins.toJSON cfg.lspConfig)} \ + | sed -e 's/^\["\(.*\)"\]/[\1]/' \ + > $out + ''; +in { options.programs.tabnine = { enable = mkEnableOption "TabNine, Smart Compose for code."; configDir = mkOption { type = types.str; - default = if stdenv.isDarwin then "Library/Preferences/TabNine" else "${config.xdg.configHome}/TabNine"; + default = + if stdenv.isDarwin + then "Library/Preferences/TabNine" + else "${config.xdg.configHome}/TabNine"; description = '' Location of TabNine configuration directory relative to \$HOME '';
@@ -34,7 +37,7 @@ };
config = mkOption { type = types.attrs; - default = { }; + default = {}; description = '' TabNine configuration written to <filename>\${configDir}/tabnine_config.json</filename>