Please add support for minions
justinjk007 opened this issue · comments
I suppose in principle it would be as simple as this:
- Remove the current content from the
minor-modes
segment and put it in a function, e.g.spaceline-minor-modes-default
. - Redefine the
minor-modes
segment as follows
(spaceline-define-segment minor-modes
(if (bound-and-true-p minions-mode)
(format-mode-line minions-mode-line-modes)
(spaceline-minor-modes-default)))
Note that minions-mode
will refuse to turn on unless it can modify mode-line-format
the way it expects to be able to. I'm not sure about that decision, it means you need to enable minions-mode
before enabling spaceline.
Thank you very much this works perfectly, I also added this (spaceline-toggle-major-mode-off)
because minions will show the major-mode anyways , this is what it looks like now
I also found out if minions is not found it will return an empty mode-line, I thought the else condition took care of that but it didn't for some reason? It works with minions nonetheless.
If the modeline is empty it's usually because something triggered an error. You can find the error message in *Messages*
.
Error during redisplay: (eval (spaceline-ml-main)) signaled (void-function spaceline-minor-modes-default) [7 times]
This is when I forget to toggle minions mode or minions mode is not installed. It works fine other-wise.
Also, Is there a hook that runs after loading spaceline, so I can put this config under minons and add a hook to run it after spaceline ?
Looks like you forgot to define the function spaceline-minor-modes-default
.
Also, Is there a hook that runs after loading spaceline, so I can put this config under minons and add a hook to run it after spaceline ?
No, not at the moment.
Oh ok, this is good for the time being as my problem is solved. May be you add after spaceline hook :) . Thanks for the help
It's not solved from my POV though, I'll keep this open if you don't mind.
No problem,
May be you should add it to minions wiki or I can
One side effect I found out is that this removes the projectile, project name from the modeline. Any Idea how to get that back?
Relatedly, support for keycast
, which operates in a similar fashion, would be quite nice. I might spend some time hacking on a fork this weekend to see if I can make it compatible with Spaceline.