diff --git a/modules/applications/emacs/company-tabnine.patch b/modules/applications/emacs/company-tabnine.patch new file mode 100644 index 0000000..f591b0b --- /dev/null +++ b/modules/applications/emacs/company-tabnine.patch @@ -0,0 +1,36 @@ +diff -ur a/company-tabnine.el b/company-tabnine.el +--- a/company-tabnine.el 1970-01-01 03:00:01.000000000 +0300 ++++ b/company-tabnine.el 2021-04-22 14:34:13.329024811 +0300 +@@ -376,7 +376,7 @@ + :sentinel #'company-tabnine--process-sentinel + :noquery t))) + ;; hook setup +- (message "TabNine server started.") ++ ;; (message "TabNine server started.") + (dolist (hook company-tabnine--hooks-alist) + (add-hook (car hook) (cdr hook)))) + +@@ -475,17 +475,17 @@ + (when (and company-tabnine--process + (memq (process-status process) '(exit signal))) + +- (message "TabNine process %s received event %s." +- (prin1-to-string process) +- (prin1-to-string event)) ++ ;; (message "TabNine process %s received event %s." ++ ;; (prin1-to-string process) ++ ;; (prin1-to-string event)) + + (if (>= company-tabnine--restart-count + company-tabnine-max-restart-count) + (progn +- (message "TabNine process restart limit reached.") ++ ;; (message "TabNine process restart limit reached.") + (setq company-tabnine--process nil)) + +- (message "Restarting TabNine process.") ++ ;; (message "Restarting TabNine process.") + (company-tabnine-start-process) + (setq company-tabnine--restart-count + (1+ company-tabnine--restart-count))))) + diff --git a/modules/applications/emacs/default.nix b/modules/applications/emacs/default.nix index 4fe822c..c9bc4ce 100644 --- a/modules/applications/emacs/default.nix +++ b/modules/applications/emacs/default.nix @@ -9,13 +9,12 @@ let cp ${inputs.crdt}/*.el . ''; }; -in -{ +in { # secrets-envsubst.emacs = { - # owner = "balsoft:users"; - # directory = "emacs"; + # owner = "balsoft:users"; + # directory = "emacs"; # }; - + home-manager.users.balsoft = { programs.emacs = { enable = true; @@ -43,7 +42,8 @@ in clipmon org-gcal company-ghci - company-tabnine + (company-tabnine.overrideAttrs + (_: { patches = [ ./company-tabnine.patch ]; })) expand-region ivy smex @@ -73,9 +73,7 @@ in ]; }; - home.packages = [ - pkgs.clang - ]; + home.packages = [ pkgs.clang ]; services.emacs.enable = true;