Feed a function to company-idle-delay which generates the idle time according to the buffer's mode. #1234
Answered
by
hongyi-zhao
hongyi-zhao
asked this question in
Q&A
-
According to the documentation here: (use-package company
[...]
:init
(defun my/company-idle-delay ()
(LaTeX-mode . (lambda ()
(setq-local company-idle-delay 0.8))))
[...]
(setq company-idle-delay #'my/company-idle-delay)) But the above code snippet doesn't do the trick at all. Any hints for this problem? Regards, |
Beta Was this translation helpful? Give feedback.
Answered by
hongyi-zhao
Oct 5, 2021
Replies: 2 comments 5 replies
-
Does the following information help?
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you. The following method solved my problem: (setq company-idle-delay (lambda () (if (derived-mode-p 'latex-mode) 0.8 0.2))) |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
hongyi-zhao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. The following method solved my problem: