Update README.md

This commit is contained in:
James Cherti
2025-03-02 20:45:17 -05:00
parent 7ad2f651fa
commit c0187a1d64

110
README.md
View File

@@ -31,13 +31,13 @@ The author uses *minimal-emacs.d* as his `early-init.el` and `init.el`, alongsid
- [How to prevent minimal-emacs.d from saving custom.el?](#how-to-prevent-minimal-emacsd-from-saving-customel) - [How to prevent minimal-emacs.d from saving custom.el?](#how-to-prevent-minimal-emacsd-from-saving-customel)
- [How to activate recentf, savehist, saveplace, and auto-revert?](#how-to-activate-recentf-savehist-saveplace-and-auto-revert) - [How to activate recentf, savehist, saveplace, and auto-revert?](#how-to-activate-recentf-savehist-saveplace-and-auto-revert)
- [Optimization: Native Compilation](#optimization-native-compilation) - [Optimization: Native Compilation](#optimization-native-compilation)
- [How to configure vterm](#how-to-configure-vterm) - [Code completion with corfu](#code-completion-with-corfu)
- [How to configure Vertico, Consult, and Embark](#how-to-configure-vertico-consult-and-embark) - [How to configure Vertico, Consult, and Embark](#how-to-configure-vertico-consult-and-embark)
- [Code Folding](#code-folding) - [Code Folding](#code-folding)
- [How to configure vterm](#how-to-configure-vterm)
- [How to configure Vim keybindings using Evil?](#how-to-configure-vim-keybindings-using-evil) - [How to configure Vim keybindings using Evil?](#how-to-configure-vim-keybindings-using-evil)
- [Configuring LSP Servers with Eglot (built-in)](#configuring-lsp-servers-with-eglot-built-in) - [Configuring LSP Servers with Eglot (built-in)](#configuring-lsp-servers-with-eglot-built-in)
- [Session Management](#session-management) - [Session Management](#session-management)
- [Code completion with corfu](#code-completion-with-corfu)
- [Inhibit the mouse](#inhibit-the-mouse) - [Inhibit the mouse](#inhibit-the-mouse)
- [A better Emacs *help* buffer](#a-better-emacs-help-buffer) - [A better Emacs *help* buffer](#a-better-emacs-help-buffer)
- [Enhance the Elisp development experience](#enhance-the-elisp-development-experience) - [Enhance the Elisp development experience](#enhance-the-elisp-development-experience)
@@ -207,22 +207,48 @@ Check if native compilation is enabled by evaluating `(native-comp-available-p)`
Native compilation can greatly enhance performance by translating Emacs Lisp code into native machine code, leading to faster execution and improved responsiveness. Native compilation can greatly enhance performance by translating Emacs Lisp code into native machine code, leading to faster execution and improved responsiveness.
### How to configure vterm ### Code completion with corfu
The `emacs-libvterm` package is a terminal emulator integrated into GNU Emacs. Built on libvterm, a C library, it offers superior performance compared to Elisp-based alternatives. This compiled code approach enables `emacs-libvterm` to handle large outputs efficiently, providing a fast and feature-complete terminal experience within Emacs. Corfu enhances in-buffer completion by displaying a compact popup with current candidates, positioned either below or above the point. Candidates can be selected by navigating up or down.
To configure `emacs-vterm`, add the following to `~/.emacs.d/post-init.el`: Cape, or Completion At Point Extensions, extends the capabilities of in-buffer completion. It integrates with Corfu or the default completion UI, by providing additional backends through completion-at-point-functions.
![](https://github.com/minad/corfu/blob/screenshots/popupinfo-dark.png?raw=true)
To configure `corfu` and `cape`, add the following to `~/.emacs.d/post-init.el`:
``` emacs-lisp ``` emacs-lisp
(use-package vterm (use-package corfu
:ensure t :ensure t
:defer t :defer t
:commands vterm :commands (corfu-mode global-corfu-mode)
:config
;; Speed up vterm
(setq vterm-timer-delay 0.01))
```
(Note that the `emacs-vterm` Emacs package requires compilation of its C components, which includes the gcc compiler and the `libvterm` library. On Debian or Ubuntu systems, the necessary packages can be installed with: `sudo apt-get install build-essential libvterm-dev libtool-bin cmake`) :hook ((prog-mode . corfu-mode)
(shell-mode . corfu-mode)
(eshell-mode . corfu-mode))
:custom
;; Hide commands in M-x which do not apply to the current mode.
(read-extended-command-predicate #'command-completion-default-include-p)
;; Disable Ispell completion function. As an alternative try `cape-dict'.
(text-mode-ispell-word-completion nil)
(tab-always-indent 'complete)
;; Enable Corfu
:config
(global-corfu-mode))
(use-package cape
:ensure t
:defer t
:commands (cape-dabbrev cape-file cape-elisp-block)
:bind ("C-c p" . cape-prefix-map)
:init
;; Add to the global default value of `completion-at-point-functions' which is
;; used by `completion-at-point'.
(add-hook 'completion-at-point-functions #'cape-dabbrev)
(add-hook 'completion-at-point-functions #'cape-file)
(add-hook 'completion-at-point-functions #'cape-elisp-block))
```
### How to configure Vertico, Consult, and Embark ### How to configure Vertico, Consult, and Embark
@@ -398,6 +424,23 @@ In addition to code folding, *outline-indent* also allows: moving indented block
![](https://raw.githubusercontent.com/jamescherti/outline-indent.el/main/.screenshot2.png) ![](https://raw.githubusercontent.com/jamescherti/outline-indent.el/main/.screenshot2.png)
### How to configure vterm
The `emacs-libvterm` package is a terminal emulator integrated into GNU Emacs. Built on libvterm, a C library, it offers superior performance compared to Elisp-based alternatives. This compiled code approach enables `emacs-libvterm` to handle large outputs efficiently, providing a fast and feature-complete terminal experience within Emacs.
To configure `emacs-vterm`, add the following to `~/.emacs.d/post-init.el`:
``` emacs-lisp
(use-package vterm
:ensure t
:defer t
:commands vterm
:config
;; Speed up vterm
(setq vterm-timer-delay 0.01))
```
(Note that the `emacs-vterm` Emacs package requires compilation of its C components, which includes the gcc compiler and the `libvterm` library. On Debian or Ubuntu systems, the necessary packages can be installed with: `sudo apt-get install build-essential libvterm-dev libtool-bin cmake`)
### How to configure Vim keybindings using Evil? ### How to configure Vim keybindings using Evil?
Configuring Vim keybindings in Emacs can greatly enhance your editing efficiency if you are accustomed to Vim's modal editing style. Add the following to `~/.emacs.d/post-init.el` to set up Evil mode: Configuring Vim keybindings in Emacs can greatly enhance your editing efficiency if you are accustomed to Vim's modal editing style. Add the following to `~/.emacs.d/post-init.el` to set up Evil mode:
@@ -583,49 +626,6 @@ To configure **easysession**, add the following to `~/.emacs.d/post-init.el`:
(add-hook 'emacs-startup-hook #'easysession-save-mode 103)) (add-hook 'emacs-startup-hook #'easysession-save-mode 103))
``` ```
### Code completion with corfu
Corfu enhances in-buffer completion by displaying a compact popup with current candidates, positioned either below or above the point. Candidates can be selected by navigating up or down.
Cape, or Completion At Point Extensions, extends the capabilities of in-buffer completion. It integrates with Corfu or the default completion UI, by providing additional backends through completion-at-point-functions.
![](https://github.com/minad/corfu/blob/screenshots/popupinfo-dark.png?raw=true)
To configure `corfu` and `cape`, add the following to `~/.emacs.d/post-init.el`:
``` emacs-lisp
(use-package corfu
:ensure t
:defer t
:commands (corfu-mode global-corfu-mode)
:hook ((prog-mode . corfu-mode)
(shell-mode . corfu-mode)
(eshell-mode . corfu-mode))
:custom
;; Hide commands in M-x which do not apply to the current mode.
(read-extended-command-predicate #'command-completion-default-include-p)
;; Disable Ispell completion function. As an alternative try `cape-dict'.
(text-mode-ispell-word-completion nil)
(tab-always-indent 'complete)
;; Enable Corfu
:config
(global-corfu-mode))
(use-package cape
:ensure t
:defer t
:commands (cape-dabbrev cape-file cape-elisp-block)
:bind ("C-c p" . cape-prefix-map)
:init
;; Add to the global default value of `completion-at-point-functions' which is
;; used by `completion-at-point'.
(add-hook 'completion-at-point-functions #'cape-dabbrev)
(add-hook 'completion-at-point-functions #'cape-file)
(add-hook 'completion-at-point-functions #'cape-elisp-block))
```
### Inhibit the mouse ### Inhibit the mouse
The **inhibit-mouse** package disables mouse input in Emacs. The **inhibit-mouse** package disables mouse input in Emacs.