summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2020-12-21 09:30:15 +0100
committerAlan Pearce2020-12-21 09:31:35 +0100
commitdc139bed82691bec4b3e0fc22efd0de9eab4cbe3 (patch)
tree18e0d69e5f257949df359e07c0c8bd858af87efe
parent280490105e3ce5faa8eb96704a2760866d67243f (diff)
downloadnixfiles-dc139bed82691bec4b3e0fc22efd0de9eab4cbe3.tar.lz
nixfiles-dc139bed82691bec4b3e0fc22efd0de9eab4cbe3.tar.zst
nixfiles-dc139bed82691bec4b3e0fc22efd0de9eab4cbe3.zip
TabNine: move back to .local/tabnine/
-rw-r--r--user/emacs/init.el2
-rw-r--r--user/settings/tabnine.nix20
2 files changed, 12 insertions, 10 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 4311419b..442ca19d 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -515,7 +515,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package company-tabnine
   :commands (company-tabnine)
   :after (company)
-  :config (setq company-tabnine-binaries-folder "~/.local/share/tabnine")
+  :config (setq company-tabnine-binaries-folder "~/.local/tabnine")
   :general ("<M-tab>" #'company-tabnine-call-other-backends
             "<C-tab>" #'company-tabnine-call-other-backends)
   :init (progn
diff --git a/user/settings/tabnine.nix b/user/settings/tabnine.nix
index 4f9577e7..affeb330 100644
--- a/user/settings/tabnine.nix
+++ b/user/settings/tabnine.nix
@@ -8,6 +8,14 @@ let
     "x86_64-apple-darwin"
   else
     "x86_64-unknown-linux-musl";
+
+  tabninePackage = (pkgs.fetchurl {
+    url = "https://update.tabnine.com/${version}/${target}/TabNine";
+    sha256 = if stdenv.isDarwin then
+      "174dsbdah99576g0g31402bdb02lfnq7sbac4i9g69alklbrghxd"
+    else
+      "0lh770gjxlgx01rb8qn079nf04qs3nirahzsld1ga5v3l16wqvqh";
+  });
 in {
   imports = [ ../modules/tabnine.nix ];
   programs.tabnine = {
@@ -90,17 +98,11 @@ in {
     };
   };
 
-  xdg.dataFile."/tabnine/${version}/${target}/TabNine" = {
+  home.file.".local/tabnine/${version}/${target}/TabNine" = {
     executable = true;
-    source = (pkgs.fetchurl {
-      url = "https://update.tabnine.com/${version}/${target}/TabNine";
-      sha256 = if stdenv.isDarwin then
-        "174dsbdah99576g0g31402bdb02lfnq7sbac4i9g69alklbrghxd"
-      else
-        "0lh770gjxlgx01rb8qn079nf04qs3nirahzsld1ga5v3l16wqvqh";
-    });
+    source = tabninePackage;
   };
   programs.neovim.coc.config = {
-    "tabnine.binary_path" = "${config.home.sessionVariables.XDG_DATA_HOME}/tabnine/${version}/${target}/TabNine";
+    "tabnine.binary_path" = "${tabninePackage}";
   };
 }