all repos — nixfiles @ e39bcbd60c3e0e6fe7329be15394fb62e4d11f06

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

force use of nixpkgs' tabnine package in nvim/emacs
Alan Pearce alan@alanpearce.eu
Mon, 10 Apr 2023 11:44:39 +0200
commit

e39bcbd60c3e0e6fe7329be15394fb62e4d11f06

parent

2f154e46be6e7031943d555738a35751aeba00d5

2 files changed, 7 insertions(+), 0 deletions(-)

jump to
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -161,6 +161,10 @@ ]);     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"))
M user/settings/neovim.nixuser/settings/neovim.nix
@@ -24,6 +24,9 @@ "json.enable" = true;         "suggest.enablePreview" = true;
         "coc.preferences.formatOnSaveFiletypes" = [ "nix" ];
         "nil.formatting.command" = "nixpkgs-fmt";
+        tabnine = {
+          binary_path = "${pkgs.tabnine}/bin/TabNine";
+        };
         semantictokens = {
           filetypes = [ "nix" ];
         };