Patch company-tabnine to disable modeline spam

This commit is contained in:
Alexander Bantyev 2021-04-22 18:12:54 +03:00
parent ae07125c23
commit a2ae704841
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 43 additions and 9 deletions

View File

@ -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)))))

View File

@ -9,13 +9,12 @@ let
cp ${inputs.crdt}/*.el . cp ${inputs.crdt}/*.el .
''; '';
}; };
in in {
{
# secrets-envsubst.emacs = { # secrets-envsubst.emacs = {
# owner = "balsoft:users"; # owner = "balsoft:users";
# directory = "emacs"; # directory = "emacs";
# }; # };
home-manager.users.balsoft = { home-manager.users.balsoft = {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
@ -43,7 +42,8 @@ in
clipmon clipmon
org-gcal org-gcal
company-ghci company-ghci
company-tabnine (company-tabnine.overrideAttrs
(_: { patches = [ ./company-tabnine.patch ]; }))
expand-region expand-region
ivy ivy
smex smex
@ -73,9 +73,7 @@ in
]; ];
}; };
home.packages = [ home.packages = [ pkgs.clang ];
pkgs.clang
];
services.emacs.enable = true; services.emacs.enable = true;