mirror of
https://github.com/vale981/doom-modeline
synced 2025-03-04 08:51: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)
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
- [doom-modeline](#doom-modeline)
|
||||
- [Feature](#feature)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Install](#install)
|
||||
- [Manual](#manual)
|
||||
- [Use-package](#use-package)
|
||||
- [Customize](#customize)
|
||||
- [FAQ](#faq)
|
||||
- [Feature](#feature)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Install](#install)
|
||||
- [Manual](#manual)
|
||||
- [Use-package](#use-package)
|
||||
- [Customize](#customize)
|
||||
- [FAQ](#faq)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
|
@ -64,71 +65,49 @@ The `doom-modeline` was designed for minimalism, and offers:
|
|||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## Install
|
||||
|
||||
|
@ -138,26 +117,28 @@ From melpa, `M-x package-install RET doom-modeline RET`.
|
|||
|
||||
In `init.el`,
|
||||
|
||||
``` emacs-lisp
|
||||
```emacs-lisp
|
||||
(require 'doom-modeline)
|
||||
(doom-modeline-mode 1)
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
``` elisp
|
||||
```elisp
|
||||
(add-hook 'after-init-hook #'doom-modeline-mode)
|
||||
```
|
||||
|
||||
### Use-package
|
||||
|
||||
``` emacs-lisp
|
||||
```emacs-lisp
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1))
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
``` elisp
|
||||
```elisp
|
||||
(use-package doom-modeline
|
||||
:ensure t
|
||||
: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.
|
||||
|
||||
``` emacs-lisp
|
||||
```emacs-lisp
|
||||
;; 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.
|
||||
(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?
|
||||
|
||||
[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
|
||||
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
|
||||
nil)` to disable it. Please refer to
|
||||
[all-the-icons.el](https://github.com/domtronn/all-the-icons.el) for
|
||||
details.
|
||||
[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
|
||||
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 nil)`
|
||||
to disable it. Please refer to [all-the-icons.el](https://github.com/domtronn/all-the-icons.el)
|
||||
for details.
|
||||
|
||||
If the icons are not displayed correctly although `all-the-icons` fonts are
|
||||
installed correctly, please install the
|
||||
[non-free](http://users.teilar.gr/~g1951d/License.pdf) font
|
||||
[Symbola](https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip).
|
||||
This issue usually occurs on Windows.
|
||||
If the icons are not displayed correctly although `all-the-icons` fonts are
|
||||
installed correctly, please install the
|
||||
[non-free](http://users.teilar.gr/~g1951d/License.pdf) font
|
||||
[Symbola](https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/Symbola.zip).
|
||||
This issue usually occurs on Windows.
|
||||
|
||||
If you are using [cnfonts](https://github.com/tumashu/cnfonts), it will
|
||||
conflict with `all-the-icons`. The workaround is
|
||||
[here](https://github.com/seagle0128/doom-modeline/issues/278#issuecomment-569510336).
|
||||
If you are using [cnfonts](https://github.com/tumashu/cnfonts), it will
|
||||
conflict with `all-the-icons`. The workaround is
|
||||
[here](https://github.com/seagle0128/doom-modeline/issues/278#issuecomment-569510336).
|
||||
|
||||
1. I am experiencing the laggy issue, how to resolve it?
|
||||
|
||||
Add this configuration into your init file:
|
||||
|
||||
``` emacs-lisp
|
||||
```emacs-lisp
|
||||
;; Don’t compact font caches during GC.
|
||||
(setq inhibit-compacting-font-caches t)
|
||||
```
|
||||
|
||||
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
|
||||
names, please put this into your init file.
|
||||
It's the default behaviors of Vanilla Emacs. If you want to display the real
|
||||
names, please put this into your init file.
|
||||
|
||||
``` emacs-lisp
|
||||
(setq find-file-visit-truename t)
|
||||
```
|
||||
```emacs-lisp
|
||||
(setq find-file-visit-truename t)
|
||||
```
|
||||
|
||||
If the file is controlled by vc, refer to the documentation of
|
||||
`vc-follow-symlinks`.
|
||||
If the file is controlled by vc, refer to the documentation of
|
||||
`vc-follow-symlinks`.
|
||||
|
||||
1. Why doesn't change of branch reflect in modeline?
|
||||
|
||||
Actually it's related to `magit` and `vc-mode`.
|
||||
|
||||
- Workaround:
|
||||
- Revert the buffers manually.
|
||||
- `(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?
|
||||
|
||||
There are two methods.
|
||||
|
||||
- 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
|
||||
|
@ -403,39 +385,39 @@ Run `M-x customize-group RET doom-modeline RET` or set the variables.
|
|||
|
||||
For example:
|
||||
|
||||
```emacs-lisp
|
||||
;; Define your custom doom-modeline
|
||||
(doom-modeline-def-modeline 'my-simple-line
|
||||
'(bar matches buffer-info remote-host buffer-position parrot selection-info)
|
||||
'(misc-info minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||
```emacs-lisp
|
||||
;; Define your custom doom-modeline
|
||||
(doom-modeline-def-modeline 'my-simple-line
|
||||
'(bar matches buffer-info remote-host buffer-position parrot selection-info)
|
||||
'(misc-info minor-modes input-method buffer-encoding major-mode process vcs checker))
|
||||
|
||||
;; Add to `doom-modeline-mode-hook` or other hooks
|
||||
(defun setup-custom-doom-modeline ()
|
||||
(doom-modeline-set-modeline 'my-simple-line 'default))
|
||||
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
|
||||
```
|
||||
;; Add to `doom-modeline-mode-hook` or other hooks
|
||||
(defun setup-custom-doom-modeline ()
|
||||
(doom-modeline-set-modeline 'my-simple-line 'default))
|
||||
(add-hook 'doom-modeline-mode-hook 'setup-custom-doom-modeline)
|
||||
```
|
||||
|
||||
1. How to specify font family in modeline?
|
||||
|
||||
For example:
|
||||
For example:
|
||||
|
||||
``` emacs-lisp
|
||||
(setq doom-modeline-height 1)
|
||||
(set-face-attribute 'mode-line nil :family "Noto Sans" :height 100)
|
||||
(set-face-attribute 'mode-line-inactive nil :family "Noto Sans" :height 100)
|
||||
```
|
||||
```emacs-lisp
|
||||
(setq doom-modeline-height 1)
|
||||
(set-face-attribute 'mode-line nil :family "Noto Sans" :height 100)
|
||||
(set-face-attribute 'mode-line-inactive nil :family "Noto Sans" :height 100)
|
||||
```
|
||||
|
||||
or
|
||||
or
|
||||
|
||||
```emacs-lisp
|
||||
(custom-set-faces
|
||||
'(mode-line ((t (:family "Noto Sans" :height 0.9))))
|
||||
'(mode-line-inactive ((t (:family "Noto Sans" :height 0.9)))))
|
||||
```
|
||||
```emacs-lisp
|
||||
(custom-set-faces
|
||||
'(mode-line ((t (:family "Noto Sans" :height 0.9))))
|
||||
'(mode-line-inactive ((t (:family "Noto Sans" :height 0.9)))))
|
||||
```
|
||||
|
||||
Please refer to
|
||||
[#189](https://github.com/seagle0128/doom-modeline/issues/189) and
|
||||
[#301](https://github.com/seagle0128/doom-modeline/issues/301).
|
||||
Please refer to
|
||||
[#189](https://github.com/seagle0128/doom-modeline/issues/189) and
|
||||
[#301](https://github.com/seagle0128/doom-modeline/issues/301).
|
||||
|
||||
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
|
||||
[#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
|
||||
|
||||
If you think it's helpful for you, please consider paying a cup of coffee for
|
||||
|
|
Loading…
Add table
Reference in a new issue