summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
authorAlan Pearce2019-12-09 17:27:14 +0100
committerAlan Pearce2019-12-09 17:27:14 +0100
commit581d41b82efbd534eba36a7906078361ee6d3f85 (patch)
treee9402e46ca8f13d342bb85644f75355069e39b94 /user/modules
parent8d9f5216c8cf2a89488a9fa303e0a71557a6fdc4 (diff)
downloadnixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.tar.lz
nixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.tar.zst
nixfiles-581d41b82efbd534eba36a7906078361ee6d3f85.zip
tabnine: add crude management of tabnine installation and config
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/tabnine.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix
index 7a207fa2..c2b9a746 100644
--- a/user/modules/tabnine.nix
+++ b/user/modules/tabnine.nix
@@ -32,6 +32,15 @@ in
       '';
     };
 
+    config = mkOption {
+      type = types.attrs;
+      default = { };
+      description = ''
+        TabNine configuration written to
+        <filename>\${configDir}/tabnine_config.json</filename>
+      '';
+    };
+
     lspConfig = mkOption {
       type = types.attrs;
       default = {};
@@ -47,5 +56,8 @@ in
     home.file."${cfg.configDir}/TabNine.toml" = {
       source = lspConfigFile cfg.lspConfig;
     };
+    home.file."${cfg.configDir}/tabnine_config.json" = {
+      source = pkgs.writeText "tabnine_config.json" (builtins.toJSON cfg.config);
+    };
   };
 }