summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-04-10 11:44:39 +0200
committerAlan Pearce2023-04-10 11:44:39 +0200
commite39bcbd60c3e0e6fe7329be15394fb62e4d11f06 (patch)
tree2df2e59357888d2000a6e30842f380bb84439552
parent2f154e46be6e7031943d555738a35751aeba00d5 (diff)
downloadnixfiles-e39bcbd60c3e0e6fe7329be15394fb62e4d11f06.tar.lz
nixfiles-e39bcbd60c3e0e6fe7329be15394fb62e4d11f06.tar.zst
nixfiles-e39bcbd60c3e0e6fe7329be15394fb62e4d11f06.zip
force use of nixpkgs' tabnine package in nvim/emacs
-rw-r--r--user/settings/emacs.nix4
-rw-r--r--user/settings/neovim.nix3
2 files changed, 7 insertions, 0 deletions
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index ceeff4b7..6d0f7e1c 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -161,6 +161,10 @@ in
     extraConfig = ''
       (with-eval-after-load 'editorconfig
         (setq editorconfig-exec-path "${pkgs.editorconfig-core-c}/bin/editorconfig"))
+      (with-eval-after-load 'company-tabnine
+        (advice-add 'company-tabnine--executable-path :around
+          (lambda (original-function &rest args)
+            "${pkgs.tabnine}/bin/TabNine")))
     '' + lib.optionalString stdenv.isDarwin ''
       (with-eval-after-load 'files
         (setq insert-directory-program "${pkgs.coreutils-prefixed}/bin/gls"))
diff --git a/user/settings/neovim.nix b/user/settings/neovim.nix
index ceae1f62..e238b916 100644
--- a/user/settings/neovim.nix
+++ b/user/settings/neovim.nix
@@ -24,6 +24,9 @@
         "suggest.enablePreview" = true;
         "coc.preferences.formatOnSaveFiletypes" = [ "nix" ];
         "nil.formatting.command" = "nixpkgs-fmt";
+        tabnine = {
+          binary_path = "${pkgs.tabnine}/bin/TabNine";
+        };
         semantictokens = {
           filetypes = [ "nix" ];
         };