summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2024-05-02 19:53:25 +0200
committerAlan Pearce2024-05-02 19:53:56 +0200
commit1d9af3f92cd0ca23a2cd8465f54976d01b915104 (patch)
tree1e8e2cf49f8cd323e7d95f78b7ac18a61450fb15 /user
parent0a17d3ee9887a91567f42c14fc413141662fb6fb (diff)
downloadnixfiles-1d9af3f92cd0ca23a2cd8465f54976d01b915104.tar.lz
nixfiles-1d9af3f92cd0ca23a2cd8465f54976d01b915104.tar.zst
nixfiles-1d9af3f92cd0ca23a2cd8465f54976d01b915104.zip
emacs: don't enable tabnine if executable can't be found
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 7ccbe260..8038298a 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -558,7 +558,9 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
 (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)