all repos — nixfiles @ 1d1492faf63e7c5f0101bcb66cd769feb737c60d

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

emacs: use patch to set path to tabnine exe

Alan Pearce
commit

1d1492faf63e7c5f0101bcb66cd769feb737c60d

parent

64b978c3caecdb236765ac1636ba6d1864c8ebee

3 files changed, 7 insertions(+), 9 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -610,10 +610,8 @@ (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)))
(use-package tabnine-core :config (progn - (setq tabnine-binaries-folder "~/.local/tabnine") (with-demoted-errors "TabNine error: %s" - (when (tabnine--executable-path) - (global-tabnine-mode))) + (global-tabnine-mode)) (define-key tabnine-completion-map (kbd "TAB") #'tabnine-accept-completion) (define-key tabnine-completion-map (kbd "<tab>") #'tabnine-accept-completion)
M user/modules/tabnine.nixuser/modules/tabnine.nix
@@ -71,11 +71,5 @@
programs.emacs.extraPackages = epkgs: [ epkgs.tabnine ]; - programs.emacs.extraConfig = '' - (defun my/override-tabnine-exe-path (&rest args) - "${pkgs.tabnine}/bin/TabNine") - (with-eval-after-load 'tabnine-core - (advice-add 'tabnine--executable-path :override #'my/override-tabnine-exe-path)) - ''; }; }
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -185,6 +185,12 @@ });
lsp-mode = self.melpaPackages.lsp-mode.overrideAttrs { LSP_USE_PLISTS = "true"; # must be set in early-init }; + tabnine = self.melpaPackages.tabnine.overrideAttrs (attrs: { + postPatch = (attrs.postPatch or "") + '' + substituteInPlace tabnine-core.el \ + --replace '(tabnine--executable-path)' '"${pkgs.tabnine}/bin/TabNine"' + ''; + }); }; extraConfig = '' (with-eval-after-load 'editorconfig