all repos — nixfiles @ 1d9af3f92cd0ca23a2cd8465f54976d01b915104

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

emacs: don't enable tabnine if executable can't be found
Alan Pearce alan@alanpearce.eu
Thu, 02 May 2024 19:53:25 +0200
commit

1d9af3f92cd0ca23a2cd8465f54976d01b915104

parent

0a17d3ee9887a91567f42c14fc413141662fb6fb

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -558,7 +558,9 @@ (use-package tabnine
   :config (progn
             (setq tabnine-binaries-folder "~/.local/tabnine")
-            (global-tabnine-mode)
+            (with-demoted-errors "TabNine error: %s"
+              (when (tabnine--executable-path)
+                (global-tabnine-mode)))
 
             (define-key tabnine-completion-map (kbd "TAB") #'tabnine-accept-completion)
             (define-key tabnine-completion-map (kbd "<tab>") #'tabnine-accept-completion)