Update FAQ.

See #410: How to show that the R is running in inferior ess R mode?
This commit is contained in:
Vincent Zhang 2021-10-05 12:52:28 +08:00
parent 4cd8bf208c
commit 257b9cd6de

106
README.md
View file

@ -7,6 +7,7 @@
[![MELPA Stable](https://stable.melpa.org/packages/doom-modeline-badge.svg)](https://stable.melpa.org/#/doom-modeline) [![MELPA Stable](https://stable.melpa.org/packages/doom-modeline-badge.svg)](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)
@ -64,71 +65,49 @@ The `doom-modeline` was designed for minimalism, and offers:
## Screenshots ## Screenshots
![modeline](https://user-images.githubusercontent.com/140797/49694177-10dcd280-fbc0-11e8-8d21-971ede6afdb5.png ![modeline](https://user-images.githubusercontent.com/140797/49694177-10dcd280-fbc0-11e8-8d21-971ede6afdb5.png "Mode-line")
"Mode-line")
![search_replace](https://user-images.githubusercontent.com/140797/49694189-6913d480-fbc0-11e8-93ae-9578455dcd2c.png ![search_replace](https://user-images.githubusercontent.com/140797/49694189-6913d480-fbc0-11e8-93ae-9578455dcd2c.png "Search and Replace")
"Search and Replace")
![macro](https://user-images.githubusercontent.com/140797/49694199-cc056b80-fbc0-11e8-9bb1-533b1e64da66.png ![macro](https://user-images.githubusercontent.com/140797/49694199-cc056b80-fbc0-11e8-9bb1-533b1e64da66.png "Macro")
"Macro")
![no_icons](https://user-images.githubusercontent.com/140797/51301117-0805d900-1a69-11e9-957d-b4c7a70a1cf8.png ![no_icons](https://user-images.githubusercontent.com/140797/51301117-0805d900-1a69-11e9-957d-b4c7a70a1cf8.png "No Icons")
"No Icons")
![color_icon_cpp](https://user-images.githubusercontent.com/140797/50414928-3c63ec00-0853-11e9-9b26-6a1df278d332.png ![color_icon_cpp](https://user-images.githubusercontent.com/140797/50414928-3c63ec00-0853-11e9-9b26-6a1df278d332.png "Color C++ icon")
"Color C++ icon")
![color_icon_java](https://user-images.githubusercontent.com/140797/50415081-1428bd00-0854-11e9-9ae5-91805290c524.png ![color_icon_java](https://user-images.githubusercontent.com/140797/50415081-1428bd00-0854-11e9-9ae5-91805290c524.png "Color Java icon")
"Color Java icon")
![color_icon_elisp](https://user-images.githubusercontent.com/140797/50415381-9f568280-0855-11e9-9478-34a6dd614d96.png ![color_icon_elisp](https://user-images.githubusercontent.com/140797/50415381-9f568280-0855-11e9-9478-34a6dd614d96.png "Color Elisp icon")
"Color Elisp icon")
![evil_normal_state_icon](https://user-images.githubusercontent.com/140797/68990534-332aa600-088f-11ea-920f-20c9527a6466.png ![evil_normal_state_icon](https://user-images.githubusercontent.com/140797/68990534-332aa600-088f-11ea-920f-20c9527a6466.png "Evil Normal State icon")
"Evil Normal State icon")
![evil_insert_state_icon](https://user-images.githubusercontent.com/140797/68990540-4dfd1a80-088f-11ea-8e53-ab77af4c58c2.png ![evil_insert_state_icon](https://user-images.githubusercontent.com/140797/68990540-4dfd1a80-088f-11ea-8e53-ab77af4c58c2.png "Evil Insert State icon")
"Evil Insert State icon")
![evil_normal_state](https://user-images.githubusercontent.com/140797/49694476-b8103880-fbc5-11e8-9c18-91f5e9258333.png ![evil_normal_state](https://user-images.githubusercontent.com/140797/49694476-b8103880-fbc5-11e8-9c18-91f5e9258333.png "Evil Normal State")
"Evil Normal State")
![evil_insert_state](https://user-images.githubusercontent.com/140797/49694461-8b5c2100-fbc5-11e8-993e-d97baa9f01af.png ![evil_insert_state](https://user-images.githubusercontent.com/140797/49694461-8b5c2100-fbc5-11e8-993e-d97baa9f01af.png "Evil Insert State")
"Evil Insert State")
![lsp_version](https://user-images.githubusercontent.com/140797/53592864-c751c180-3bc9-11e9-9914-493007c013d5.png ![lsp_version](https://user-images.githubusercontent.com/140797/53592864-c751c180-3bc9-11e9-9914-493007c013d5.png "Perspective, LSP, Version, VCS and Flycheck")
"Perspective, LSP, Version, VCS and Flycheck")
![perspective](https://user-images.githubusercontent.com/140797/49694481-e0983280-fbc5-11e8-8cb2-c8d2e782bcdb.png ![perspective](https://user-images.githubusercontent.com/140797/49694481-e0983280-fbc5-11e8-8cb2-c8d2e782bcdb.png "Perspective, LSP, Version and VCS")
"Perspective, LSP, Version and VCS")
![notifications](https://user-images.githubusercontent.com/140797/53592683-64602a80-3bc9-11e9-8054-91f79aa930b9.png ![notifications](https://user-images.githubusercontent.com/140797/53592683-64602a80-3bc9-11e9-8054-91f79aa930b9.png "Notifications")
"Notifications")
![minions](https://user-images.githubusercontent.com/140797/50301291-de857c00-04c1-11e9-84c5-bfbc8de8295f.png ![minions](https://user-images.githubusercontent.com/140797/50301291-de857c00-04c1-11e9-84c5-bfbc8de8295f.png "Minions and minor modes")
"Minions and minor modes")
![debug](https://user-images.githubusercontent.com/140797/50302008-c57dca80-04c3-11e9-8578-50154ef4f9f0.png ![debug](https://user-images.githubusercontent.com/140797/50302008-c57dca80-04c3-11e9-8578-50154ef4f9f0.png "Debug state")
"Debug state")
![nyan_parrot](https://user-images.githubusercontent.com/140797/51301061-da209480-1a68-11e9-9f64-905d889df9d6.png ![nyan_parrot](https://user-images.githubusercontent.com/140797/51301061-da209480-1a68-11e9-9f64-905d889df9d6.png "Nyan and Parrot")
"Nyan and Parrot")
![irc](https://user-images.githubusercontent.com/140797/69004814-20c67000-0954-11ea-8489-f5a527a80574.png ![irc](https://user-images.githubusercontent.com/140797/69004814-20c67000-0954-11ea-8489-f5a527a80574.png "IRC Notifications")
"IRC Notifications")
![battery](https://user-images.githubusercontent.com/140797/53593622-ba35d200-3bcb-11e9-85b3-38d64d05c127.png ![battery](https://user-images.githubusercontent.com/140797/53593622-ba35d200-3bcb-11e9-85b3-38d64d05c127.png "Battery")
"Battery")
![package](https://user-images.githubusercontent.com/140797/57503916-e769d380-7324-11e9-906d-44c79f7408a3.png ![package](https://user-images.githubusercontent.com/140797/57503916-e769d380-7324-11e9-906d-44c79f7408a3.png "Package")
"Package")
![info](https://user-images.githubusercontent.com/140797/57506248-d96c8080-732d-11e9-8167-644c8fc4e0db.png ![info](https://user-images.githubusercontent.com/140797/57506248-d96c8080-732d-11e9-8167-644c8fc4e0db.png "Info")
"Info")
![helm](https://user-images.githubusercontent.com/140797/57506112-6531dd00-732d-11e9-8a5e-22166f42dd4c.png ![helm](https://user-images.githubusercontent.com/140797/57506112-6531dd00-732d-11e9-8a5e-22166f42dd4c.png "Helm")
"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)
@ -344,10 +325,9 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
[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
@ -363,7 +343,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
Add this configuration into your init file: Add this configuration into your init file:
``` emacs-lisp ```emacs-lisp
;; Dont compact font caches during GC. ;; Dont compact font caches during GC.
(setq inhibit-compacting-font-caches t) (setq inhibit-compacting-font-caches t)
``` ```
@ -373,7 +353,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
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)
``` ```
@ -383,6 +363,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
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
@ -419,7 +401,7 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
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)
@ -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