I used global-company-mode
from my .emacs
like this:
(add-hook 'after-init-hook 'global-company-mode)
Now I’m trying to move to use-package
, like this:
(use-package company
:config
(global-company-mode))
Now if I check with C-h m, company-mode
is said to be active, but it’s not listed on my modeline (I don’t use anything that would hide it). And it actually works, as I get the company
popup, when I start typing a function or variable name.
whitespace-mode
is much worse, though:
(use-package whitespace
:ensure t ;; I also tried without this line
:config
(global-whitespace-mode)
:bind
(([f10] . whitespace-mode)
([(shift f10)] . global-whitespace-mode)))
Now WS
doesn’t appear on my modeline as expected (again, I don’t hide anything) and I cannot see its effects like the end-of-line marker $
characters, and it’s not even listed when I press C-h m. But when I press shift f10, it says
Global Whitespace mode disabled
and when I press it again, I get the message that it got enabled, and I can also see the effects in all my buffers (and in C-h m).
What am I missing?
Edit: I just realised that diminish
is actually installed as a dependency (I’m trying to figure out what pulled it in). However, diminished-mode-alist
is nil
, so I don’t think that’s the reason of mode names not displaying in my mode line (correct me if I’m wrong).
Edit2: deferring loading the diminish
package solved the company
problem, but the whitespace
related one still persists.
.emacs
and see ifcompany-mode
is not appearing in mode-line :-(use-package diminish :defer t)
. You'd have to restart emacs after you modify.emacs
– Chakravarthy Raghunandan Oct 12 '16 at 15:09whitespace-mode
like so :-(add-hook 'prog-mode-hook 'whitespace-mode)
? – Chakravarthy Raghunandan Oct 12 '16 at 17:41after-init-hook
before switching touse-package
; it worked fine. The strange thing here is that theglobal-whitespace-mode
ist
, yet, its effects are not visible unless I toggle it twice. – GergelyPolonkai Oct 12 '16 at 20:38