Skip to content
ThibautVerron edited this page Apr 7, 2020 · 14 revisions

In most cases using this package is as easy as:

(use-package minions
  :config (minions-mode 1))

Compatibility with other mode line packages

"Mode line related packages" can be roughly divided into two groups:

  • Packages that make modest changes to the mode line, adding or replacing one or very few elements.
  • Packages that take full control of the mode line, replacing pretty much everything.

Minions (like the other mode line related that I have written) falls into the first category and it should work well with most other packages that also fall into the same category, but it might not be compatible with packages in the second category.

I have written several packages that fall into the first category because none of the packages in the second satisfied me and bending them to my wishes would have been harder than to just implement the features that I actually want. It should be obvious by now that my interest in hacking around the limitations imposed by such packages is limited.

Compatibility with modest mode line packages

Compatibility with all-or-nothing mode line packages

minions-mode works by replacing mode-line-modes anywhere in the global value of mode-line-format with minions-mode-line-modes. mode-line-modes does not have to be a top-level element, it is also found if it is located deeper in the tree.

It does however have to appear literally in the value of that variable. If it is a member of variable foobar and the symbol foobar appears in mode-line-format, then that is not good enough.

Enabling minions-mode line succeeds if you do it before you enable any other mode line package, but that won't do much good if some other packages later completely replaces the value of mode-line-format.

Generally speaking, to use Minions and such a package together, you have to first enable the other package and after that you have to manually inject minions-mode-line-modes into mode-line-format, while also removing whatever that package previously replaced mode-line-modes with.

I have been using this package before I wrote Moody and Minions and I kept using all three packages together for a while. I have since stopped using Smart-mode-line, but not before opening a few issues:

It is not compatible out of the box.

For powerline-default-theme, the following minimal setup appears to work for the display:

(defpowerline powerline-major-mode "")
(defpowerline powerline-process "")
(defpowerline powerline-minor-modes minions-mode-line-modes)

For powerline-center-theme, the same setup almost works, some loose delimiters remain here and there.

For powerline-vim-theme, the same setup works, but one might want to tweak the delimiters used by minions.

Mouse-support is not perfect: minor modes cannot be toggled, and the tooltips are broken.

This setup does not work with powerline-center-evil-theme, it results in an empty mode line.

For the sake of being exhaustive, powerline-nano-theme works out of the box because it does not feature the modes.

For better support, please manipulate mode-line-format as described above. Alternatively you can also create a copy of powerline-default-theme (or one of the other "themes") and then edit and call that. Once you have done that, please post it here to save others the work.

It is not compatible out of the box.

Please manipulate mode-line-format as described above. Alternatively you can also create a copy of spaceline-spacemacs-theme (or one of the other "themes") and then edit and call that. Once you have done that, please post it here to save others the work.

It is compatible out of the box.

Clone this wiki locally