[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/capf-autosuggest 8f091ce 26/63: Extend description
From: |
ELPA Syncer |
Subject: |
[elpa] externals/capf-autosuggest 8f091ce 26/63: Extend description |
Date: |
Wed, 27 Oct 2021 14:57:58 -0400 (EDT) |
branch: externals/capf-autosuggest
commit 8f091ce819a8a791b821b337e30dc57e7dbbdfd0
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>
Extend description
---
capf-autosuggest.el | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 60 insertions(+), 6 deletions(-)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index c1cb88e..d0dc3ed 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -24,12 +24,66 @@
;;; Commentary:
-;; capf-autosuggest-mode is a minor mode that lets you preview the first
-;; completion candidate of completion-at-point as an overlay. This is very
-;; useful in combination with history-capf.el which implements
-;; completion-at-point functions for comint and eshell history. Previewing the
-;; most recent matching history element gives you auto-suggestions, familiar to
-;; users of zsh-autosuggestions and fish.
+;; capf-autosuggest lets you preview the most recent matching history element,
+;; similar to zsh-autosuggestions or fish. It works in eshell and in modes
+;; derived from comint-mode, for example M-x shell or M-x run-python
+;;
+;; Installation:
+;;
+;; Add the following to your Emacs init file:
+;;
+;; (add-to-list 'load-path "/path/to/emacs-capf-autosuggest")
+;; (require 'capf-autosuggest)
+;; (add-hook 'comint-mode-hook #'capf-autosuggest-setup-comint)
+;; (add-hook 'eshell-mode-hook #'capf-autosuggest-setup-eshell)
+;;
+;; Configuration:
+;;
+;; Use `capf-autosuggest-define-partial-accept-cmd' to make a command that can
+;; move point into an auto-suggested layer.
+;;
+;; Example: to make C-M-f (forward-sexp) movable into suggested text, put the
+;; following into you init file:
+;;
+;; (with-eval-after-load 'capf-autosuggest
+;; (capf-autosuggest-define-partial-accept-cmd
+;; movable-forward-sexp forward-sexp)
+;; (define-key capf-autosuggest-active-mode-map [remap forward-sexp]
+;; #'movable-forward-sexp))
+;;
+;; Details:
+;;
+;; capf-autosuggest provides a minor mode, capf-autosuggest-mode, that lets you
+;; preview the first completion candidate for in-buffer completion as an
+;; overlay. Instead of using the default hook `completion-at-point-functions',
+;; it uses its own hook `capf-autosuggest-capf-functions'. However, by
+;; default, this hook contains a function that reads the default hook, but only
+;; if point is at end of line, because an auto-suggested overlay can be
+;; annoying in the middle of a line. If you want, you can try enabling this
+;; minor mode in an ordinary buffer for previewing tab completion candidates at
+;; end of line.
+;;
+;; completion-at-point functions for comint and eshell history are also
+;; provided. Because they are less useful for tab completion and more useful
+;; for auto-suggestion preview, they should be added to
+;; `capf-autosuggest-capf-functions', which doesn't interfere with tab
+;; completion. The setup functions mentioned in "Installation" paragraph add
+;; them to this hook locally. By default, if there are no matches for history
+;; completion and point is at end of line, we fall back to previewing the
+;; default tab completion candidates, as described in the previous paragraph.
+;;
+;; You can customize this behaviour by customizing
+;; `capf-autosuggest-capf-functions'. For example, you could add
+;; `capf-autosuggest-orig-capf' to enable auto-suggestions of tab completion
+;; candidates in the middle of a line.
+;;
+;; Alternatives:
+;;
+;; There is also esh-autosuggest[1] with similar functionality. Differences:
+;; it optionally allows having a delay, it depends on emacs package company, it
+;; is implemented only for eshell.
+;;
+;; [1]: http://github.com/dieggsy/esh-autosuggest
;;; Code:
- [elpa] externals/capf-autosuggest 3c346b7 13/63: Added history-capf.el, (continued)
- [elpa] externals/capf-autosuggest 3c346b7 13/63: Added history-capf.el, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest c6a38f3 17/63: Sentence end double space, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 0ef9e94 16/63: Add documentation to capf functions, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 03004ef 18/63: Begin commentary to capf-autosuggest, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 8507236 20/63: Generalize capf-autosuggest-capf-functions, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest d53b499 24/63: insert -> insert-and-inherit, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 2163c64 27/63: after-change-functions -> buffer-modified-tick, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 5455064 22/63: Allow forward-sexp to enter overlay, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest b836fcc 33/63: Prevent misbehaving capf functions from modifying buffer, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest abd71ab 29/63: Don't leak overlays when killing all local variables, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 8f091ce 26/63: Extend description,
ELPA Syncer <=
- [elpa] externals/capf-autosuggest 024d438 28/63: Don't exclude completion-in-region-mode, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 40336d0 38/63: Adjust short description, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 76b643a 34/63: Doc fixes and additions, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest b16a9d8 36/63: Silence compiler warnings, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 4461655 40/63: Try not to interfere with command output too much, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 84bdbc5 44/63: Fix completion-in-region popping up in eshell after "(forward", ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 2b241a4 43/63: Avoid recomputing string length, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 1ede511 46/63: Minor doc fix, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 200c509 50/63: Disable overlay before executing a partial accept command, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 3064910 54/63: Add undo-boundary when accepting suggestion, ELPA Syncer, 2021/10/27