From d3779759662e190b9ce7ccbd4620b956984e2b07 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 17 Apr 2023 09:23:15 +0200 Subject: TabNine: move basic editor setup to tabnine module --- user/modules/tabnine.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'user/modules/tabnine.nix') diff --git a/user/modules/tabnine.nix b/user/modules/tabnine.nix index 7e38e0ec..e4b80ad9 100644 --- a/user/modules/tabnine.nix +++ b/user/modules/tabnine.nix @@ -72,5 +72,22 @@ in home.file."${cfg.configDir}/registration_key" = { text = cfg.registrationKey; }; + + programs.neovim.plugins = [ + pkgs.vimPlugins.coc-tabnine + ]; + programs.neovim.coc.settings = { + "tabnine.binary_path" = "${pkgs.tabnine}/bin/TabNine"; + }; + + programs.emacs.extraPackages = epkgs: [ + epkgs.company-tabnine + ]; + programs.emacs.extraConfig = '' + (with-eval-after-load 'company-tabnine + (advice-add 'company-tabnine--executable-path :around + (lambda (original-function &rest args) + "${pkgs.tabnine}/bin/TabNine"))) + ''; }; } -- cgit 1.4.1