summary refs log tree commit diff stats
path: root/user/modules/tabnine.nix
diff options
context:
space:
mode:
authorAlan Pearce2023-04-17 09:23:15 +0200
committerAlan Pearce2023-04-17 09:23:15 +0200
commitd3779759662e190b9ce7ccbd4620b956984e2b07 (patch)
tree2a3301e975298f9f77df693273aa6690940ac5ae /user/modules/tabnine.nix
parent83ff6d74036e287497bf987f336ca800b101ed0b (diff)
downloadnixfiles-d3779759662e190b9ce7ccbd4620b956984e2b07.tar.lz
nixfiles-d3779759662e190b9ce7ccbd4620b956984e2b07.tar.zst
nixfiles-d3779759662e190b9ce7ccbd4620b956984e2b07.zip
TabNine: move basic editor setup to tabnine module
Diffstat (limited to 'user/modules/tabnine.nix')
-rw-r--r--user/modules/tabnine.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix
index 7e38e0ec..e4b80ad9 100644
--- a/user/modules/tabnine.nix
+++ b/user/modules/tabnine.nix
@@ -72,5 +72,22 @@ in
     home.file."${cfg.configDir}/registration_key" = {
       text = cfg.registrationKey;
     };
+
+    programs.neovim.plugins = [
+      pkgs.vimPlugins.coc-tabnine
+    ];
+    programs.neovim.coc.settings = {
+      "tabnine.binary_path" = "${pkgs.tabnine}/bin/TabNine";
+    };
+
+    programs.emacs.extraPackages = epkgs: [
+      epkgs.company-tabnine
+    ];
+    programs.emacs.extraConfig = ''
+      (with-eval-after-load 'company-tabnine
+        (advice-add 'company-tabnine--executable-path :around
+          (lambda (original-function &rest args)
+            "${pkgs.tabnine}/bin/TabNine")))
+    '';
   };
 }