mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-04 17:01:39 -05:00
Update FAQ.
See #410: How to show that the R is running in inferior ess R mode?
This commit is contained in:
parent
4cd8bf208c
commit
257b9cd6de
1 changed files with 98 additions and 104 deletions
202
README.md
202
README.md
|
@ -7,16 +7,17 @@
|
||||||
[](https://stable.melpa.org/#/doom-modeline)
|
[](https://stable.melpa.org/#/doom-modeline)
|
||||||
|
|
||||||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
|
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
|
||||||
- [doom-modeline](#doom-modeline)
|
- [doom-modeline](#doom-modeline)
|
||||||
- [Feature](#feature)
|
- [Feature](#feature)
|
||||||
- [Screenshots](#screenshots)
|
- [Screenshots](#screenshots)
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
- [Manual](#manual)
|
- [Manual](#manual)
|
||||||
- [Use-package](#use-package)
|
- [Use-package](#use-package)
|
||||||
- [Customize](#customize)
|
- [Customize](#customize)
|
||||||
- [FAQ](#faq)
|
- [FAQ](#faq)
|
||||||
|
|
||||||
<!-- markdown-toc end -->
|
<!-- markdown-toc end -->
|
||||||
|
|
||||||
|
@ -64,71 +65,49 @@ The `doom-modeline` was designed for minimalism, and offers:
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|
||||||
"Mode-line")
|
|
||||||
|
|
||||||

|
||||||
"Search and Replace")
|
|
||||||
|
|
||||||

|
||||||
"Macro")
|
|
||||||
|
|
||||||

|
||||||
"No Icons")
|
|
||||||
|
|
||||||

|
||||||
"Color C++ icon")
|
|
||||||
|
|
||||||

|
||||||
"Color Java icon")
|
|
||||||
|
|
||||||

|
||||||
"Color Elisp icon")
|
|
||||||
|
|
||||||

|
||||||
"Evil Normal State icon")
|
|
||||||
|
|
||||||

|
||||||
"Evil Insert State icon")
|
|
||||||
|
|
||||||

|
||||||
"Evil Normal State")
|
|
||||||
|
|
||||||

|
||||||
"Evil Insert State")
|
|
||||||
|
|
||||||

|
||||||
"Perspective, LSP, Version, VCS and Flycheck")
|
|
||||||
|
|
||||||

|
||||||
"Perspective, LSP, Version and VCS")
|
|
||||||
|
|
||||||

|
||||||
"Notifications")
|
|
||||||
|
|
||||||

|
||||||
"Minions and minor modes")
|
|
||||||
|
|
||||||

|
||||||
"Debug state")
|
|
||||||
|
|
||||||

|
||||||
"Nyan and Parrot")
|
|
||||||
|
|
||||||

|
||||||
"IRC Notifications")
|
|
||||||
|
|
||||||

|
||||||
"Battery")
|
|
||||||
|
|
||||||

|
||||||
"Package")
|
|
||||||
|
|
||||||

|
||||||
"Info")
|
|
||||||
|
|
||||||

|
||||||
"Helm")
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
|
@ -138,26 +117,28 @@ From melpa, `M-x package-install RET doom-modeline RET`.
|
||||||
|
|
||||||
In `init.el`,
|
In `init.el`,
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
(require 'doom-modeline)
|
(require 'doom-modeline)
|
||||||
(doom-modeline-mode 1)
|
(doom-modeline-mode 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
``` elisp
|
```elisp
|
||||||
(add-hook 'after-init-hook #'doom-modeline-mode)
|
(add-hook 'after-init-hook #'doom-modeline-mode)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use-package
|
### Use-package
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (doom-modeline-mode 1))
|
:init (doom-modeline-mode 1))
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
``` elisp
|
```elisp
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook (after-init . doom-modeline-mode))
|
:hook (after-init . doom-modeline-mode))
|
||||||
|
@ -174,7 +155,7 @@ Strongly recommend to use
|
||||||
|
|
||||||
Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
;; How tall the mode-line should be. It's only respected in GUI.
|
;; How tall the mode-line should be. It's only respected in GUI.
|
||||||
;; If the actual char height is larger, it respects the actual height.
|
;; If the actual char height is larger, it respects the actual height.
|
||||||
(setq doom-modeline-height 25)
|
(setq doom-modeline-height 25)
|
||||||
|
@ -341,48 +322,48 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
||||||
|
|
||||||
1. How to display icons correctly?
|
1. How to display icons correctly?
|
||||||
|
|
||||||
[all-the-icons](https://github.com/domtronn/all-the-icons.el) are necessary.
|
[all-the-icons](https://github.com/domtronn/all-the-icons.el) are necessary.
|
||||||
Run `M-x all-the-icons-install-fonts` to install the resource fonts. On
|
Run `M-x all-the-icons-install-fonts` to install the resource fonts. On
|
||||||
Windows, the fonts should be installed manually. `all-the-icons` only
|
Windows, the fonts should be installed manually. `all-the-icons` only
|
||||||
support GUI. If you don't like color icons, `(setq all-the-icons-color-icons
|
support GUI. If you don't like color icons, `(setq all-the-icons-color-icons nil)`
|
||||||
nil)` to disable it. Please refer to
|
to disable it. Please refer to [all-the-icons.el](https://github.com/domtronn/all-the-icons.el)
|
||||||
[all-the-icons.el](https://github.com/domtronn/all-the-icons.el) for
|
for details.
|
||||||
details.
|
|
||||||
|
|
||||||
If the icons are not displayed correctly although `all-the-icons` fonts are
|
If the icons are not displayed correctly although `all-the-icons` fonts are
|
||||||
installed correctly, please install the
|
installed correctly, please install the
|
||||||
[non-free](http://users.teilar.gr/~g1951d/License.pdf) font
|
[non-free](http://users.teilar.gr/~g1951d/License.pdf) font
|
||||||
[Symbola](https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip).
|
[Symbola](https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip).
|
||||||
This issue usually occurs on Windows.
|
This issue usually occurs on Windows.
|
||||||
|
|
||||||
If you are using [cnfonts](https://github.com/tumashu/cnfonts), it will
|
If you are using [cnfonts](https://github.com/tumashu/cnfonts), it will
|
||||||
conflict with `all-the-icons`. The workaround is
|
conflict with `all-the-icons`. The workaround is
|
||||||
[here](https://github.com/seagle0128/doom-modeline/issues/278#issuecomment-569510336).
|
[here](https://github.com/seagle0128/doom-modeline/issues/278#issuecomment-569510336).
|
||||||
|
|
||||||
1. I am experiencing the laggy issue, how to resolve it?
|
1. I am experiencing the laggy issue, how to resolve it?
|
||||||
|
|
||||||
Add this configuration into your init file:
|
Add this configuration into your init file:
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
;; Don’t compact font caches during GC.
|
;; Don’t compact font caches during GC.
|
||||||
(setq inhibit-compacting-font-caches t)
|
(setq inhibit-compacting-font-caches t)
|
||||||
```
|
```
|
||||||
|
|
||||||
1. A ridiculous path is displayed on the mode-line while visiting a symbolink.
|
1. A ridiculous path is displayed on the mode-line while visiting a symbolink.
|
||||||
|
|
||||||
It's the default behaviors of Vanilla Emacs. If you want to display the real
|
It's the default behaviors of Vanilla Emacs. If you want to display the real
|
||||||
names, please put this into your init file.
|
names, please put this into your init file.
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
(setq find-file-visit-truename t)
|
(setq find-file-visit-truename t)
|
||||||
```
|
```
|
||||||
|
|
||||||
If the file is controlled by vc, refer to the documentation of
|
If the file is controlled by vc, refer to the documentation of
|
||||||
`vc-follow-symlinks`.
|
`vc-follow-symlinks`.
|
||||||
|
|
||||||
1. Why doesn't change of branch reflect in modeline?
|
1. Why doesn't change of branch reflect in modeline?
|
||||||
|
|
||||||
Actually it's related to `magit` and `vc-mode`.
|
Actually it's related to `magit` and `vc-mode`.
|
||||||
|
|
||||||
- Workaround:
|
- Workaround:
|
||||||
- Revert the buffers manually.
|
- Revert the buffers manually.
|
||||||
- `(setq auto-revert-check-vc-info t)` brings the performance issue.
|
- `(setq auto-revert-check-vc-info t)` brings the performance issue.
|
||||||
|
@ -396,6 +377,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
||||||
How can I define my own mode-line?
|
How can I define my own mode-line?
|
||||||
|
|
||||||
There are two methods.
|
There are two methods.
|
||||||
|
|
||||||
- If the information is simple, just add to `mode-line-misc-info` or `global-mode-string`.
|
- If the information is simple, just add to `mode-line-misc-info` or `global-mode-string`.
|
||||||
|
|
||||||
- Use `doom-modeline-def-modeline` to define your own mode-line and set it as
|
- Use `doom-modeline-def-modeline` to define your own mode-line and set it as
|
||||||
|
@ -403,39 +385,39 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```emacs-lisp
|
```emacs-lisp
|
||||||
;; Define your custom doom-modeline
|
;; Define your custom doom-modeline
|
||||||
(doom-modeline-def-modeline 'my-simple-line
|
(doom-modeline-def-modeline 'my-simple-line
|
||||||
'(bar matches buffer-info remote-host buffer-position parrot selection-info)
|
'(bar matches buffer-info remote-host buffer-position parrot selection-info)
|
||||||
'(misc-info minor-modes input-method buffer-encoding major-mode process vcs checker))
|
'(misc-info minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||||
|
|
||||||
;; Add to `doom-modeline-mode-hook` or other hooks
|
;; Add to `doom-modeline-mode-hook` or other hooks
|
||||||
(defun setup-custom-doom-modeline ()
|
(defun setup-custom-doom-modeline ()
|
||||||
(doom-modeline-set-modeline 'my-simple-line 'default))
|
(doom-modeline-set-modeline 'my-simple-line 'default))
|
||||||
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
|
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
|
||||||
```
|
```
|
||||||
|
|
||||||
1. How to specify font family in modeline?
|
1. How to specify font family in modeline?
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
``` emacs-lisp
|
```emacs-lisp
|
||||||
(setq doom-modeline-height 1)
|
(setq doom-modeline-height 1)
|
||||||
(set-face-attribute 'mode-line nil :family "Noto Sans" :height 100)
|
(set-face-attribute 'mode-line nil :family "Noto Sans" :height 100)
|
||||||
(set-face-attribute 'mode-line-inactive nil :family "Noto Sans" :height 100)
|
(set-face-attribute 'mode-line-inactive nil :family "Noto Sans" :height 100)
|
||||||
```
|
```
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
```emacs-lisp
|
```emacs-lisp
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
'(mode-line ((t (:family "Noto Sans" :height 0.9))))
|
'(mode-line ((t (:family "Noto Sans" :height 0.9))))
|
||||||
'(mode-line-inactive ((t (:family "Noto Sans" :height 0.9)))))
|
'(mode-line-inactive ((t (:family "Noto Sans" :height 0.9)))))
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to
|
Please refer to
|
||||||
[#189](https://github.com/seagle0128/doom-modeline/issues/189) and
|
[#189](https://github.com/seagle0128/doom-modeline/issues/189) and
|
||||||
[#301](https://github.com/seagle0128/doom-modeline/issues/301).
|
[#301](https://github.com/seagle0128/doom-modeline/issues/301).
|
||||||
|
|
||||||
1. How to disable symbolic links expanding in mode-line?
|
1. How to disable symbolic links expanding in mode-line?
|
||||||
|
|
||||||
|
@ -456,6 +438,18 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
||||||
[#209](https://github.com/seagle0128/doom-modeline/issues/209) and
|
[#209](https://github.com/seagle0128/doom-modeline/issues/209) and
|
||||||
[#224](https://github.com/seagle0128/doom-modeline/issues/224).
|
[#224](https://github.com/seagle0128/doom-modeline/issues/224).
|
||||||
|
|
||||||
|
1. How to show that the R is running in inferior ess R mode?
|
||||||
|
|
||||||
|
The ess R mode modifies `mode-line-buffer-identification` directly to display the status.
|
||||||
|
To display the status in `doom-modeline`, you can add the status to `mode-line-process`
|
||||||
|
or `global-mode-string` as below.
|
||||||
|
|
||||||
|
```elisp
|
||||||
|
(add-hook 'inferior-ess-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(add-to-list 'mode-line-process '(:eval (nth ess--busy-count ess-busy-strings)))))
|
||||||
|
```
|
||||||
|
|
||||||
## Donate
|
## Donate
|
||||||
|
|
||||||
If you think it's helpful for you, please consider paying a cup of coffee for
|
If you think it's helpful for you, please consider paying a cup of coffee for
|
||||||
|
|
Loading…
Add table
Reference in a new issue