50 changed files with 22120 additions and 4527 deletions
-
26elpa/dash-2.17.0/dash-autoloads.el
-
9elpa/dash-2.17.0/dash-pkg.el
-
3410elpa/dash-2.17.0/dash.info
-
74elpa/dash-2.18.0/dash-autoloads.el
-
12elpa/dash-2.18.0/dash-pkg.el
-
1753elpa/dash-2.18.0/dash.el
-
4656elpa/dash-2.18.0/dash.info
-
2elpa/dash-2.18.0/dir
-
2elpa/dockerfile-mode-1.3/dockerfile-mode-pkg.el
-
4elpa/dockerfile-mode-1.4/dockerfile-mode-autoloads.el
-
2elpa/dockerfile-mode-1.4/dockerfile-mode-pkg.el
-
38elpa/dockerfile-mode-1.4/dockerfile-mode.el
-
1elpa/ivy-0.13.1.signed
-
76elpa/ivy-0.13.1/ChangeLog
-
124elpa/ivy-0.13.1/colir.el
-
18elpa/ivy-0.13.1/dir
-
168elpa/ivy-0.13.1/ivy-autoloads.el
-
133elpa/ivy-0.13.1/ivy-hydra.el
-
154elpa/ivy-0.13.1/ivy-overlay.el
-
2elpa/ivy-0.13.1/ivy-pkg.el
-
5056elpa/ivy-0.13.1/ivy.el
-
1954elpa/ivy-0.13.1/ivy.info
-
124elpa/ivy-20210216.1611/colir.el
-
18elpa/ivy-20210216.1611/dir
-
6elpa/ivy-20210216.1611/elpa.el
-
166elpa/ivy-20210216.1611/ivy-autoloads.el
-
138elpa/ivy-20210216.1611/ivy-faces.el
-
138elpa/ivy-20210216.1611/ivy-help.org
-
155elpa/ivy-20210216.1611/ivy-overlay.el
-
12elpa/ivy-20210216.1611/ivy-pkg.el
-
5295elpa/ivy-20210216.1611/ivy.el
-
1972elpa/ivy-20210216.1611/ivy.info
-
0elpa/language-id-0.12/language-id-autoloads.el
-
4elpa/language-id-0.12/language-id-pkg.el
-
15elpa/language-id-0.12/language-id.el
-
2elpa/markdown-mode-20210123.1547/markdown-mode-pkg.el
-
0elpa/markdown-mode-20210216.852/markdown-mode-autoloads.el
-
2elpa/markdown-mode-20210216.852/markdown-mode-pkg.el
-
173elpa/markdown-mode-20210216.852/markdown-mode.el
-
36elpa/nginx-mode-1.1.9/nginx-mode-autoloads.el
-
2elpa/nginx-mode-1.1.9/nginx-mode-pkg.el
-
203elpa/nginx-mode-1.1.9/nginx-mode.el
-
2elpa/request-20201026.2324/request-pkg.el
-
0elpa/request-20210214.37/request-autoloads.el
-
2elpa/request-20210214.37/request-pkg.el
-
503elpa/request-20210214.37/request.el
-
3elpa/ssh-config-mode-20210217.1051/ssh-config-keywords.txt
-
0elpa/ssh-config-mode-20210217.1051/ssh-config-mode-autoloads.el
-
2elpa/ssh-config-mode-20210217.1051/ssh-config-mode-pkg.el
-
0elpa/ssh-config-mode-20210217.1051/ssh-config-mode.el
@ -1,26 +0,0 @@ |
|||
;;; dash-autoloads.el --- automatically extracted autoloads |
|||
;; |
|||
;;; Code: |
|||
|
|||
(add-to-list 'load-path (directory-file-name |
|||
(or (file-name-directory #$) (car load-path)))) |
|||
|
|||
|
|||
;;;### (autoloads nil "dash" "dash.el" (0 0 0 0)) |
|||
;;; Generated autoloads from dash.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-keep" "-l" "-m" "-non" "-only-some" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0)) |
|||
|
|||
;;;*** |
|||
|
|||
;; Local Variables: |
|||
;; version-control: never |
|||
;; no-byte-compile: t |
|||
;; no-update-autoloads: t |
|||
;; coding: utf-8 |
|||
;; End: |
|||
;;; dash-autoloads.el ends here |
|||
@ -1,9 +0,0 @@ |
|||
(define-package "dash" "2.17.0" "A modern list library for Emacs" 'nil :commit "721436b04da4e2795387cb48a98ac6de37ece0fd" :keywords |
|||
("lists") |
|||
:authors |
|||
(("Magnar Sveen" . "magnars@gmail.com")) |
|||
:maintainer |
|||
("Magnar Sveen" . "magnars@gmail.com")) |
|||
;; Local Variables: |
|||
;; no-byte-compile: t |
|||
;; End: |
|||
3410
elpa/dash-2.17.0/dash.info
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,74 @@ |
|||
;;; dash-autoloads.el --- automatically extracted autoloads |
|||
;; |
|||
;;; Code: |
|||
|
|||
(add-to-list 'load-path (directory-file-name |
|||
(or (file-name-directory #$) (car load-path)))) |
|||
|
|||
|
|||
;;;### (autoloads nil "dash" "dash.el" (0 0 0 0)) |
|||
;;; Generated autoloads from dash.el |
|||
|
|||
(autoload 'dash-fontify-mode "dash" "\ |
|||
Toggle fontification of Dash special variables. |
|||
|
|||
If called interactively, enable Dash-Fontify mode if ARG is |
|||
positive, and disable it if ARG is zero or negative. If called |
|||
from Lisp, also enable the mode if ARG is omitted or nil, and |
|||
toggle it if ARG is `toggle'; disable the mode otherwise. |
|||
|
|||
Dash-Fontify mode is a buffer-local minor mode intended for Emacs |
|||
Lisp buffers. Enabling it causes the special variables bound in |
|||
anaphoric Dash macros to be fontified. These anaphoras include |
|||
`it', `it-index', `acc', and `other'. In older Emacs versions |
|||
which do not dynamically detect macros, Dash-Fontify mode |
|||
additionally fontifies Dash macro calls. |
|||
|
|||
See also `dash-fontify-mode-lighter' and |
|||
`global-dash-fontify-mode'. |
|||
|
|||
\(fn &optional ARG)" t nil) |
|||
|
|||
(put 'global-dash-fontify-mode 'globalized-minor-mode t) |
|||
|
|||
(defvar global-dash-fontify-mode nil "\ |
|||
Non-nil if Global Dash-Fontify mode is enabled. |
|||
See the `global-dash-fontify-mode' command |
|||
for a description of this minor mode. |
|||
Setting this variable directly does not take effect; |
|||
either customize it (see the info node `Easy Customization') |
|||
or call the function `global-dash-fontify-mode'.") |
|||
|
|||
(custom-autoload 'global-dash-fontify-mode "dash" nil) |
|||
|
|||
(autoload 'global-dash-fontify-mode "dash" "\ |
|||
Toggle Dash-Fontify mode in all buffers. |
|||
With prefix ARG, enable Global Dash-Fontify mode if ARG is positive; |
|||
otherwise, disable it. If called from Lisp, enable the mode if |
|||
ARG is omitted or nil. |
|||
|
|||
Dash-Fontify mode is enabled in all buffers where |
|||
`dash--turn-on-fontify-mode' would do it. |
|||
See `dash-fontify-mode' for more information on Dash-Fontify mode. |
|||
|
|||
\(fn &optional ARG)" t nil) |
|||
|
|||
(autoload 'dash-register-info-lookup "dash" "\ |
|||
Register the Dash Info manual with `info-lookup-symbol'. |
|||
This allows Dash symbols to be looked up with \\[info-lookup-symbol]." t nil) |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-juxt" "-keep" "-l" "-m" "-no" "-o" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil nil ("dash-pkg.el") (0 0 0 0)) |
|||
|
|||
;;;*** |
|||
|
|||
;; Local Variables: |
|||
;; version-control: never |
|||
;; no-byte-compile: t |
|||
;; no-update-autoloads: t |
|||
;; coding: utf-8 |
|||
;; End: |
|||
;;; dash-autoloads.el ends here |
|||
@ -0,0 +1,12 @@ |
|||
(define-package "dash" "2.18.0" "A modern list library for Emacs" |
|||
'((emacs "24")) |
|||
:commit "0e975782086020aa12863fdb658d6a3cc748a10c" :authors |
|||
'(("Magnar Sveen" . "magnars@gmail.com")) |
|||
:maintainer |
|||
'("Magnar Sveen" . "magnars@gmail.com") |
|||
:keywords |
|||
'("extensions" "lisp") |
|||
:url "https://github.com/magnars/dash.el") |
|||
;; Local Variables: |
|||
;; no-byte-compile: t |
|||
;; End: |
|||
elpa/dash-2.18.0/dash.el
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
4656
elpa/dash-2.18.0/dash.info
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,2 +0,0 @@ |
|||
;;; Generated package description from /data/data/com.termux/files/home/.emacs.d/elpa/dockerfile-mode-1.3/dockerfile-mode.el -*- no-byte-compile: t -*- |
|||
(define-package "dockerfile-mode" "1.3" "Major mode for editing Docker's Dockerfiles" '((emacs "24") (s "1.12")) :commit "d31f7685ebc5832d957e25070a930aa42984327d" :url "https://github.com/spotify/dockerfile-mode") |
|||
@ -0,0 +1,2 @@ |
|||
;;; Generated package description from /home/raphael/.emacs.d/elpa/dockerfile-mode-1.4/dockerfile-mode.el -*- no-byte-compile: t -*- |
|||
(define-package "dockerfile-mode" "1.4" "Major mode for editing Docker's Dockerfiles" '((emacs "24")) :commit "ed1d04c89cd8b53963f2dcae7cb3a46967e0abbf" :url "https://github.com/spotify/dockerfile-mode") |
|||
@ -0,0 +1 @@ |
|||
Good signature from 066DAFCB81E42C40 GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org> (trust undefined) created at 2020-06-22T16:05:01-0500 using RSA |
|||
@ -0,0 +1,76 @@ |
|||
2020-06-22 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Split package ivy into ivy, swiper, counsel |
|||
|
|||
Publishing them in a single package on GNU ELPA has lead to version |
|||
conflicts. |
|||
|
|||
2019-10-16 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit 'cd634c6f51458f81898ecf2821ac3169cb65a1eb' from ivy |
|||
|
|||
2019-07-20 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
packages/ivy/dir: Use install-info |
|||
|
|||
2019-07-20 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit '85d1e2e779ca92e6ef8e47d08f866b13d4d87aee' from ivy |
|||
|
|||
2019-05-13 Stefan Monnier <monnier@iro.umontreal.ca> |
|||
|
|||
* avy/targets/checkdoc.el, ivy/doc/scripts.el: copyright tweak |
|||
|
|||
2019-05-11 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit '525b2e4887dd839045313f32d3ddeb5cab4c7a7e' from ivy |
|||
|
|||
2018-01-12 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Fix bad git subtree merge for ivy |
|||
|
|||
2017-11-30 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit '4a2cee03519f98cf95b29905dec2566a39ff717e' from swiper |
|||
|
|||
2017-04-10 Stefan Monnier <monnier@iro.umontreal.ca> |
|||
|
|||
ivy/targets/obsolete-config.el: Satisfy check_copyright |
|||
|
|||
2017-04-10 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Add 'packages/ivy/' from commit |
|||
'f4b433436668ac09f3d1815fbfb4b71f3e0690fa' |
|||
|
|||
git-subtree-dir: packages/ivy git-subtree-mainline: |
|||
6f4e442a66d625f647faa51e88e052c3d93e9657 git-subtree-split: |
|||
f4b433436668ac09f3d1815fbfb4b71f3e0690fa |
|||
|
|||
2017-04-10 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Remove ivy 0.9.0 to add it again with subtree |
|||
|
|||
2017-04-09 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit 'af746cad0e9c5d010ea530381111372f7daae55b' from swiper |
|||
|
|||
2017-04-08 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit 'ace01d5603ddf49b025eb811b612af72ec38dcfb' from swiper |
|||
|
|||
2016-07-11 Paul Eggert <eggert@cs.ucla.edu> |
|||
|
|||
Fix some quoting problems in doc strings |
|||
|
|||
Most of these are minor issues involving, e.g., quoting `like this' |
|||
instead of 'like this'. A few involve escaping ` and ' with a preceding |
|||
\= when the characters should not be turned into curved single quotes. |
|||
|
|||
2016-04-25 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Merge commit 'db005182ad0fd05c07e8e5c085abe6c750e6c578' from ivy |
|||
|
|||
2016-04-25 Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
Rename swiper -> ivy |
|||
|
|||
@ -0,0 +1,124 @@ |
|||
;;; colir.el --- Color blending library -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2015-2019 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
;; This file is part of GNU Emacs. |
|||
|
|||
;; This file is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation; either version 3, or (at your option) |
|||
;; any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; For a full copy of the GNU General Public License |
|||
;; see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This package solves the problem of adding a face with a background |
|||
;; to text which may already have a background. In all conflicting |
|||
;; areas, instead of choosing either the original or the new |
|||
;; background face, their blended sum is used. |
|||
;; |
|||
;; The blend mode functions are taken from URL |
|||
;; `https://en.wikipedia.org/wiki/Blend_modes'. |
|||
|
|||
;;; Code: |
|||
|
|||
(require 'cl-lib) |
|||
(require 'color) |
|||
|
|||
(defcustom colir-compose-method #'colir-compose-alpha |
|||
"Select a method to compose two color channels." |
|||
:group 'ivy |
|||
:type '(radio |
|||
(function-item colir-compose-alpha) |
|||
(function-item colir-compose-overlay) |
|||
(function-item colir-compose-soft-light))) |
|||
|
|||
(defun colir-compose-soft-light (a b) |
|||
"Compose A and B channels." |
|||
(if (< b 0.5) |
|||
(+ (* 2 a b) (* a a (- 1 b b))) |
|||
(+ (* 2 a (- 1 b)) (* (sqrt a) (- (* 2 b) 1))))) |
|||
|
|||
(defun colir-compose-overlay (a b) |
|||
"Compose A and B channels." |
|||
(if (< a 0.5) |
|||
(* 2 a b) |
|||
(- 1 (* 2 (- 1 a) (- 1 b))))) |
|||
|
|||
(defun colir-compose-alpha (a b &optional alpha gamma) |
|||
"Compose A and B channels. |
|||
Optional argument ALPHA is a number between 0.0 and 1.0 which corresponds |
|||
to the influence of A on the result. Default value is 0.5. |
|||
Optional argument GAMMA is used for gamma correction. Default value is 2.2." |
|||
(setq alpha (or alpha 0.5)) |
|||
(setq gamma (or gamma 2.2)) |
|||
(+ (* (expt a gamma) alpha) (* (expt b gamma) (- 1 alpha)))) |
|||
|
|||
(defun colir-blend (c1 c2) |
|||
"Blend the two colors C1 and C2 using `colir-compose-method'. |
|||
C1 and C2 are triples of floats in [0.0 1.0] range." |
|||
(apply #'color-rgb-to-hex |
|||
(cl-mapcar |
|||
(if (eq (frame-parameter nil 'background-mode) 'dark) |
|||
;; this method works nicely for dark themes |
|||
'colir-compose-soft-light |
|||
colir-compose-method) |
|||
c1 c2))) |
|||
|
|||
(defun colir-color-parse (color) |
|||
"Convert string COLOR to triple of floats in [0.0 1.0]." |
|||
(if (string-match "#\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)" color) |
|||
(mapcar (lambda (v) (/ (string-to-number v 16) 255.0)) |
|||
(list (match-string 1 color) (match-string 2 color) (match-string 3 color))) |
|||
;; does not work properly in terminal (maps color to nearest color |
|||
;; from available color palette). |
|||
(color-name-to-rgb color))) |
|||
|
|||
(defun colir--blend-background (start next prevn face object) |
|||
(let ((background-prev (face-background prevn))) |
|||
(progn |
|||
(put-text-property |
|||
start next 'face |
|||
(if background-prev |
|||
(cons `(background-color |
|||
. ,(colir-blend |
|||
(colir-color-parse background-prev) |
|||
(colir-color-parse (face-background face nil t)))) |
|||
prevn) |
|||
(list face prevn)) |
|||
object)))) |
|||
|
|||
(defun colir-blend-face-background (start end face &optional object) |
|||
"Append to the face property of the text from START to END the face FACE. |
|||
When the text already has a face with a non-plain background, |
|||
blend it with the background of FACE. |
|||
Optional argument OBJECT is the string or buffer containing the text. |
|||
See also `font-lock-append-text-property'." |
|||
(let (next prev prevn) |
|||
(while (/= start end) |
|||
(setq next (next-single-property-change start 'face object end)) |
|||
(setq prev (get-text-property start 'face object)) |
|||
(setq prevn (if (listp prev) |
|||
(cl-find-if #'atom prev) |
|||
prev)) |
|||
(cond |
|||
((or (keywordp (car-safe prev)) (consp (car-safe prev))) |
|||
(put-text-property start next 'face (cons face prev) object)) |
|||
((facep prevn) |
|||
(colir--blend-background start next prevn face object)) |
|||
(t |
|||
(put-text-property start next 'face face object))) |
|||
(setq start next)))) |
|||
|
|||
(provide 'colir) |
|||
|
|||
;;; colir.el ends here |
|||
@ -0,0 +1,18 @@ |
|||
This is the file .../info/dir, which contains the |
|||
topmost node of the Info hierarchy, called (dir)Top. |
|||
The first time you invoke Info you start off looking at this node. |
|||
|
|||
File: dir, Node: Top This is the top of the INFO tree |
|||
|
|||
This (the Directory node) gives a menu of major topics. |
|||
Typing "q" exits, "H" lists all Info commands, "d" returns here, |
|||
"h" gives a primer for first-timers, |
|||
"mEmacs<Return>" visits the Emacs manual, etc. |
|||
|
|||
In Emacs, you can click mouse button 2 on a menu item or cross reference |
|||
to select it. |
|||
|
|||
* Menu: |
|||
|
|||
Emacs |
|||
* Ivy: (ivy). Using Ivy for completion. |
|||
@ -0,0 +1,168 @@ |
|||
;;; ivy-autoloads.el --- automatically extracted autoloads |
|||
;; |
|||
;;; Code: |
|||
|
|||
(add-to-list 'load-path (directory-file-name |
|||
(or (file-name-directory #$) (car load-path)))) |
|||
|
|||
|
|||
;;;### (autoloads nil "colir" "colir.el" (0 0 0 0)) |
|||
;;; Generated autoloads from colir.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "colir" '("colir-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil "ivy" "ivy.el" (0 0 0 0)) |
|||
;;; Generated autoloads from ivy.el |
|||
|
|||
(autoload 'ivy-resume "ivy" "\ |
|||
Resume the last completion session." t nil) |
|||
|
|||
(autoload 'ivy-read "ivy" "\ |
|||
Read a string in the minibuffer, with completion. |
|||
|
|||
PROMPT is a string, normally ending in a colon and a space. |
|||
`ivy-count-format' is prepended to PROMPT during completion. |
|||
|
|||
COLLECTION is either a list of strings, a function, an alist, or |
|||
a hash table, supplied for `minibuffer-completion-table'. |
|||
|
|||
PREDICATE is applied to filter out the COLLECTION immediately. |
|||
This argument is for compatibility with `completing-read'. |
|||
|
|||
When REQUIRE-MATCH is non-nil, only members of COLLECTION can be |
|||
selected. |
|||
|
|||
If INITIAL-INPUT is non-nil, then insert that input in the |
|||
minibuffer initially. |
|||
|
|||
HISTORY is a name of a variable to hold the completion session |
|||
history. |
|||
|
|||
KEYMAP is composed with `ivy-minibuffer-map'. |
|||
|
|||
PRESELECT, when non-nil, determines which one of the candidates |
|||
matching INITIAL-INPUT to select initially. An integer stands |
|||
for the position of the desired candidate in the collection, |
|||
counting from zero. Otherwise, use the first occurrence of |
|||
PRESELECT in the collection. Comparison is first done with |
|||
`equal'. If that fails, and when applicable, match PRESELECT as |
|||
a regular expression. |
|||
|
|||
DEF is for compatibility with `completing-read'. |
|||
|
|||
UPDATE-FN is called each time the candidate list is re-displayed. |
|||
|
|||
When SORT is non-nil, `ivy-sort-functions-alist' determines how |
|||
to sort candidates before displaying them. |
|||
|
|||
ACTION is a function to call after selecting a candidate. |
|||
It takes one argument, the selected candidate. If COLLECTION is |
|||
an alist, the argument is a cons cell, otherwise it's a string. |
|||
|
|||
MULTI-ACTION, when non-nil, is called instead of ACTION when |
|||
there are marked candidates. It takes the list of candidates as |
|||
its only argument. When it's nil, ACTION is called on each marked |
|||
candidate. |
|||
|
|||
UNWIND is a function of no arguments to call before exiting. |
|||
|
|||
RE-BUILDER is a function transforming input text into a regex |
|||
pattern. |
|||
|
|||
MATCHER is a function which can override how candidates are |
|||
filtered based on user input. It takes a regex pattern and a |
|||
list of candidates, and returns the list of matching candidates. |
|||
|
|||
DYNAMIC-COLLECTION is a boolean specifying whether the list of |
|||
candidates is updated after each input by calling COLLECTION. |
|||
|
|||
EXTRA-PROPS can be used to store collection-specific |
|||
session-specific data. |
|||
|
|||
CALLER is a symbol to uniquely identify the caller to `ivy-read'. |
|||
It is used, along with COLLECTION, to determine which |
|||
customizations apply to the current completion session. |
|||
|
|||
\(fn PROMPT COLLECTION &key PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY PRESELECT DEF KEYMAP UPDATE-FN SORT ACTION MULTI-ACTION UNWIND RE-BUILDER MATCHER DYNAMIC-COLLECTION EXTRA-PROPS CALLER)" nil nil) |
|||
|
|||
(autoload 'ivy-completing-read "ivy" "\ |
|||
Read a string in the minibuffer, with completion. |
|||
|
|||
This interface conforms to `completing-read' and can be used for |
|||
`completing-read-function'. |
|||
|
|||
PROMPT is a string that normally ends in a colon and a space. |
|||
COLLECTION is either a list of strings, an alist, an obarray, or a hash table. |
|||
PREDICATE limits completion to a subset of COLLECTION. |
|||
REQUIRE-MATCH is a boolean value. See `completing-read'. |
|||
INITIAL-INPUT is a string inserted into the minibuffer initially. |
|||
HISTORY is a list of previously selected inputs. |
|||
DEF is the default value. |
|||
INHERIT-INPUT-METHOD is currently ignored. |
|||
|
|||
\(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY DEF INHERIT-INPUT-METHOD)" nil nil) |
|||
|
|||
(defvar ivy-mode nil "\ |
|||
Non-nil if Ivy mode is enabled. |
|||
See the `ivy-mode' command |
|||
for a description of this minor mode. |
|||
Setting this variable directly does not take effect; |
|||
either customize it (see the info node `Easy Customization') |
|||
or call the function `ivy-mode'.") |
|||
|
|||
(custom-autoload 'ivy-mode "ivy" nil) |
|||
|
|||
(autoload 'ivy-mode "ivy" "\ |
|||
Toggle Ivy mode on or off. |
|||
Turn Ivy mode on if ARG is positive, off otherwise. |
|||
Turning on Ivy mode sets `completing-read-function' to |
|||
`ivy-completing-read'. |
|||
|
|||
Global bindings: |
|||
\\{ivy-mode-map} |
|||
|
|||
Minibuffer bindings: |
|||
\\{ivy-minibuffer-map} |
|||
|
|||
\(fn &optional ARG)" t nil) |
|||
|
|||
(autoload 'ivy-switch-buffer "ivy" "\ |
|||
Switch to another buffer." t nil) |
|||
|
|||
(autoload 'ivy-switch-view "ivy" "\ |
|||
Switch to one of the window views stored by `ivy-push-view'." t nil) |
|||
|
|||
(autoload 'ivy-switch-buffer-other-window "ivy" "\ |
|||
Switch to another buffer in another window." t nil) |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ivy" '("ivy-" "with-ivy-window"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil "ivy-hydra" "ivy-hydra.el" (0 0 0 0)) |
|||
;;; Generated autoloads from ivy-hydra.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ivy-hydra" '("hydra-ivy" "ivy-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil "ivy-overlay" "ivy-overlay.el" (0 0 0 0)) |
|||
;;; Generated autoloads from ivy-overlay.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ivy-overlay" '("ivy-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil nil ("ivy-pkg.el") (0 0 0 0)) |
|||
|
|||
;;;*** |
|||
|
|||
;; Local Variables: |
|||
;; version-control: never |
|||
;; no-byte-compile: t |
|||
;; no-update-autoloads: t |
|||
;; coding: utf-8 |
|||
;; End: |
|||
;;; ivy-autoloads.el ends here |
|||
@ -0,0 +1,133 @@ |
|||
;;; ivy-hydra.el --- Additional key bindings for Ivy -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2015-2019 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
;; URL: https://github.com/abo-abo/swiper |
|||
;; Version: 0.13.0 |
|||
;; Package-Requires: ((emacs "24.5") (ivy "0.13.0") (hydra "0.15.0")) |
|||
;; Keywords: convenience |
|||
|
|||
;; This file is part of GNU Emacs. |
|||
|
|||
;; This file is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation; either version 3, or (at your option) |
|||
;; any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; For a full copy of the GNU General Public License |
|||
;; see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This package provides the `hydra-ivy/body' command, which is a |
|||
;; quasi-prefix map, with many useful bindings. These bindings are |
|||
;; shorter than usual, using mostly unprefixed keys. |
|||
|
|||
;;; Code: |
|||
|
|||
(require 'ivy) |
|||
(require 'hydra) |
|||
|
|||
(defun ivy--matcher-desc () |
|||
"Return description of `ivy--regex-function'." |
|||
(let ((cell (assq ivy--regex-function ivy-preferred-re-builders))) |
|||
(if cell |
|||
(cdr cell) |
|||
"other"))) |
|||
|
|||
(defhydra hydra-ivy (:hint nil |
|||
:color pink) |
|||
" |
|||
^ ^ ^ ^ ^ ^ | ^Call^ ^ ^ | ^Cancel^ | ^Options^ | Action _w_/_s_/_a_: %-14s(ivy-action-name) |
|||
^-^-^-^-^-^-+-^-^---------^-^--+-^-^------+-^-^-------+-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------------- |
|||
^ ^ _k_ ^ ^ | _f_ollow occ_U_r | _i_nsert | _c_: calling %-5s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search |
|||
_h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher %-5s(ivy--matcher-desc)^^^^^^^^^^^^ _T_runcate: %-11`truncate-lines |
|||
^ ^ _j_ ^ ^ | _g_o ^ ^ | ^ ^ | _<_/_>_: shrink/grow^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _D_efinition of this menu |
|||
" |
|||
;; arrows |
|||
("h" ivy-beginning-of-buffer) |
|||
("j" ivy-next-line) |
|||
("k" ivy-previous-line) |
|||
("l" ivy-end-of-buffer) |
|||
;; mark |
|||
("m" ivy-mark) |
|||
("u" ivy-unmark) |
|||
("DEL" ivy-unmark-backward) |
|||
("t" ivy-toggle-marks) |
|||
;; actions |
|||
("o" keyboard-escape-quit :exit t) |
|||
("r" ivy-dispatching-done-hydra :exit t) |
|||
("C-g" keyboard-escape-quit :exit t) |
|||
("i" nil) |
|||
("C-o" nil) |
|||
("f" ivy-alt-done :exit nil) |
|||
("C-j" ivy-alt-done :exit nil) |
|||
("d" ivy-done :exit t) |
|||
("g" ivy-call) |
|||
("C-m" ivy-done :exit t) |
|||
("c" ivy-toggle-calling) |
|||
("M" ivy-rotate-preferred-builders) |
|||
(">" ivy-minibuffer-grow) |
|||
("<" ivy-minibuffer-shrink) |
|||
("w" ivy-prev-action) |
|||
("s" ivy-next-action) |
|||
("a" (let ((ivy-read-action-function #'ivy-read-action-by-key)) |
|||
(ivy-read-action))) |
|||
("T" (setq truncate-lines (not truncate-lines))) |
|||
("C" ivy-toggle-case-fold) |
|||
("U" ivy-occur :exit t) |
|||
("D" (ivy-exit-with-action |
|||
(lambda (_) (find-function 'hydra-ivy/body))) |
|||
:exit t)) |
|||
|
|||
(defvar ivy-dispatching-done-columns 2 |
|||
"Number of columns to use if the hint does not fit on one line.") |
|||
|
|||
(defvar ivy-dispatching-done-idle nil |
|||
"When non-nil, the hint will be delayed by this many seconds.") |
|||
|
|||
(defvar ivy-dispatching-done-hydra-exit-keys '(("M-o" nil "back") |
|||
("C-g" nil)) |
|||
"Keys that can be used to exit `ivy-dispatching-done-hydra'.") |
|||
|
|||
(defun ivy-dispatching-done-hydra () |
|||
"Select one of the available actions and call `ivy-done'." |
|||
(interactive) |
|||
(let* ((actions (ivy-state-action ivy-last)) |
|||
(extra-actions ivy-dispatching-done-hydra-exit-keys) |
|||
(doc (concat "action: " |
|||
(mapconcat |
|||
(lambda (x) (format "[%s] %s" (nth 0 x) (nth 2 x))) |
|||
(append (cdr actions) |
|||
extra-actions) ", "))) |
|||
(estimated-len (length doc)) |
|||
(n-columns (if (> estimated-len (window-width)) |
|||
ivy-dispatching-done-columns |
|||
nil)) |
|||
(i 0)) |
|||
(if (null (ivy--actionp actions)) |
|||
(ivy-done) |
|||
(funcall |
|||
(eval |
|||
`(defhydra ivy-read-action (:color teal :columns ,n-columns :idle ,ivy-dispatching-done-idle) |
|||
"action" |
|||
,@(mapcar (lambda (x) |
|||
(list (nth 0 x) |
|||
`(progn |
|||
(setcar (ivy-state-action ivy-last) ,(cl-incf i)) |
|||
(ivy-done)) |
|||
(nth 2 x))) |
|||
(cdr actions)) |
|||
,@extra-actions)))))) |
|||
|
|||
(setq ivy-read-action-function (lambda (_) (ivy-dispatching-done-hydra))) |
|||
|
|||
(provide 'ivy-hydra) |
|||
|
|||
;;; ivy-hydra.el ends here |
|||
@ -0,0 +1,154 @@ |
|||
;;; ivy-overlay.el --- Overlay display functions for Ivy -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2016-2019 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
;; Keywords: convenience |
|||
|
|||
;; This program is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation, either version 3 of the License, or |
|||
;; (at your option) any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; You should have received a copy of the GNU General Public License |
|||
;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This package allows to setup Ivy's completion at point to actually |
|||
;; show the candidates and the input at point, instead of in the |
|||
;; minibuffer. |
|||
|
|||
;;; Code: |
|||
|
|||
(defface ivy-cursor |
|||
'((((class color) (background light)) |
|||
:background "black" :foreground "white") |
|||
(((class color) (background dark)) |
|||
:background "white" :foreground "black")) |
|||
"Cursor face for inline completion." |
|||
:group 'ivy-faces) |
|||
|
|||
(defvar ivy--old-cursor-type t) |
|||
|
|||
(defvar ivy-overlay-at nil |
|||
"Overlay variable for `ivy-display-function-overlay'.") |
|||
|
|||
(declare-function ivy--truncate-string "ivy") |
|||
|
|||
(defun ivy-left-pad (str width) |
|||
"Return STR, but with each line indented by WIDTH spaces. |
|||
Lines are truncated to the window width." |
|||
(let ((padding (make-string width ?\s))) |
|||
(mapconcat (lambda (x) |
|||
(ivy--truncate-string (concat padding x) |
|||
(1- (+ (window-width) |
|||
(window-hscroll))))) |
|||
(split-string str "\n") |
|||
"\n"))) |
|||
|
|||
(defun ivy-overlay-cleanup () |
|||
"Clean up after `ivy-display-function-overlay'." |
|||
(when (overlayp ivy-overlay-at) |
|||
(delete-overlay ivy-overlay-at) |
|||
(setq ivy-overlay-at nil)) |
|||
(unless cursor-type |
|||
(setq cursor-type ivy--old-cursor-type)) |
|||
(when (fboundp 'company-abort) |
|||
(company-abort))) |
|||
|
|||
(defvar ivy-height) |
|||
|
|||
(defun ivy-overlay-show-after (str) |
|||
"Display STR in an overlay at point. |
|||
|
|||
First, fill each line of STR with spaces to the current column. |
|||
Then attach the overlay to the character before point." |
|||
(if ivy-overlay-at |
|||
(progn |
|||
(move-overlay ivy-overlay-at (1- (point)) (line-end-position)) |
|||
(overlay-put ivy-overlay-at 'invisible nil)) |
|||
(let ((available-height (count-lines (point) (window-end nil t)))) |
|||
(unless (>= available-height ivy-height) |
|||
(recenter (- (window-height) ivy-height 2)))) |
|||
(setq ivy-overlay-at (make-overlay (1- (point)) (line-end-position))) |
|||
;; Specify face to avoid clashing with other overlays. |
|||
(overlay-put ivy-overlay-at 'face 'default) |
|||
(overlay-put ivy-overlay-at 'priority 9999)) |
|||
(overlay-put ivy-overlay-at 'display str) |
|||
(overlay-put ivy-overlay-at 'after-string "")) |
|||
|
|||
(declare-function org-current-level "org") |
|||
(declare-function org-at-heading-p "org") |
|||
(defvar org-indent-indentation-per-level) |
|||
(defvar ivy-height) |
|||
(defvar ivy-last) |
|||
(defvar ivy-text) |
|||
(defvar ivy-completion-beg) |
|||
(declare-function ivy-add-face-text-property "ivy") |
|||
(declare-function ivy--get-window "ivy") |
|||
(declare-function ivy-state-current "ivy") |
|||
(declare-function ivy-state-window "ivy") |
|||
(declare-function ivy--remove-prefix "ivy") |
|||
|
|||
(defun ivy-overlay-impossible-p (_str) |
|||
(or |
|||
(and (eq major-mode 'org-mode) |
|||
(plist-get (text-properties-at (point)) 'src-block)) |
|||
(<= (window-height) (+ ivy-height 2)) |
|||
(= (point) (point-min)) |
|||
(< (- (+ (window-width) (window-hscroll)) (current-column)) |
|||
30))) |
|||
|
|||
(defun ivy-display-function-overlay (str) |
|||
"Called from the minibuffer, display STR in an overlay in Ivy window. |
|||
Hide the minibuffer contents and cursor." |
|||
(if (save-selected-window |
|||
(select-window (ivy-state-window ivy-last)) |
|||
(ivy-overlay-impossible-p str)) |
|||
(let ((buffer-undo-list t)) |
|||
(save-excursion |
|||
(forward-line 1) |
|||
(insert str))) |
|||
(ivy-add-face-text-property (minibuffer-prompt-end) (point-max) |
|||
'(:foreground "white")) |
|||
(setq cursor-type nil) |
|||
(with-selected-window (ivy--get-window ivy-last) |
|||
(when cursor-type |
|||
(setq ivy--old-cursor-type cursor-type)) |
|||
(setq cursor-type nil) |
|||
(let ((overlay-str |
|||
(apply |
|||
#'concat |
|||
(buffer-substring (max (point-min) (1- (point))) (point)) |
|||
ivy-text |
|||
(and (eolp) " ") |
|||
(buffer-substring (point) (line-end-position)) |
|||
(and (> (length str) 0) |
|||
(list "\n" |
|||
(ivy-left-pad |
|||
(ivy--remove-prefix "\n" str) |
|||
(+ |
|||
(if (and (eq major-mode 'org-mode) |
|||
(bound-and-true-p org-indent-mode)) |
|||
(if (org-at-heading-p) |
|||
(1- (org-current-level)) |
|||
(* org-indent-indentation-per-level (org-current-level))) |
|||
0) |
|||
(save-excursion |
|||
(when ivy-completion-beg |
|||
(goto-char ivy-completion-beg)) |
|||
(current-column))))))))) |
|||
(let ((cursor-offset (1+ (length ivy-text)))) |
|||
(ivy-add-face-text-property cursor-offset (1+ cursor-offset) |
|||
'ivy-cursor overlay-str t)) |
|||
(ivy-overlay-show-after overlay-str))))) |
|||
|
|||
(provide 'ivy-overlay) |
|||
|
|||
;;; ivy-overlay.el ends here |
|||
@ -0,0 +1,2 @@ |
|||
;; Generated package description from ivy.el -*- no-byte-compile: t -*- |
|||
(define-package "ivy" "0.13.1" "Incremental Vertical completYon" '((emacs "24.5")) :keywords '("matching") :authors '(("Oleh Krehel" . "ohwoeowho@gmail.com")) :maintainer '("Oleh Krehel" . "ohwoeowho@gmail.com") :url "https://github.com/abo-abo/swiper") |
|||
5056
elpa/ivy-0.13.1/ivy.el
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1954
elpa/ivy-0.13.1/ivy.info
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,124 @@ |
|||
;;; colir.el --- Color blending library -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2015-2019 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
|
|||
;; This file is part of GNU Emacs. |
|||
|
|||
;; This file is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation; either version 3, or (at your option) |
|||
;; any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; For a full copy of the GNU General Public License |
|||
;; see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This package solves the problem of adding a face with a background |
|||
;; to text which may already have a background. In all conflicting |
|||
;; areas, instead of choosing either the original or the new |
|||
;; background face, their blended sum is used. |
|||
;; |
|||
;; The blend mode functions are taken from URL |
|||
;; `https://en.wikipedia.org/wiki/Blend_modes'. |
|||
|
|||
;;; Code: |
|||
|
|||
(require 'cl-lib) |
|||
(require 'color) |
|||
|
|||
(defcustom colir-compose-method #'colir-compose-alpha |
|||
"Select a method to compose two color channels." |
|||
:group 'ivy |
|||
:type '(radio |
|||
(function-item colir-compose-alpha) |
|||
(function-item colir-compose-overlay) |
|||
(function-item colir-compose-soft-light))) |
|||
|
|||
(defun colir-compose-soft-light (a b) |
|||
"Compose A and B channels." |
|||
(if (< b 0.5) |
|||
(+ (* 2 a b) (* a a (- 1 b b))) |
|||
(+ (* 2 a (- 1 b)) (* (sqrt a) (- (* 2 b) 1))))) |
|||
|
|||
(defun colir-compose-overlay (a b) |
|||
"Compose A and B channels." |
|||
(if (< a 0.5) |
|||
(* 2 a b) |
|||
(- 1 (* 2 (- 1 a) (- 1 b))))) |
|||
|
|||
(defun colir-compose-alpha (a b &optional alpha gamma) |
|||
"Compose A and B channels. |
|||
Optional argument ALPHA is a number between 0.0 and 1.0 which corresponds |
|||
to the influence of A on the result. Default value is 0.5. |
|||
Optional argument GAMMA is used for gamma correction. Default value is 2.2." |
|||
(setq alpha (or alpha 0.5)) |
|||
(setq gamma (or gamma 2.2)) |
|||
(+ (* (expt a gamma) alpha) (* (expt b gamma) (- 1 alpha)))) |
|||
|
|||
(defun colir-blend (c1 c2) |
|||
"Blend the two colors C1 and C2 using `colir-compose-method'. |
|||
C1 and C2 are triples of floats in [0.0 1.0] range." |
|||
(apply #'color-rgb-to-hex |
|||
(cl-mapcar |
|||
(if (eq (frame-parameter nil 'background-mode) 'dark) |
|||
;; this method works nicely for dark themes |
|||
'colir-compose-soft-light |
|||
colir-compose-method) |
|||
c1 c2))) |
|||
|
|||
(defun colir-color-parse (color) |
|||
"Convert string COLOR to triple of floats in [0.0 1.0]." |
|||
(if (string-match "#\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)" color) |
|||
(mapcar (lambda (v) (/ (string-to-number v 16) 255.0)) |
|||
(list (match-string 1 color) (match-string 2 color) (match-string 3 color))) |
|||
;; does not work properly in terminal (maps color to nearest color |
|||
;; from available color palette). |
|||
(color-name-to-rgb color))) |
|||
|
|||
(defun colir--blend-background (start next prevn face object) |
|||
(let ((background-prev (face-background prevn))) |
|||
(progn |
|||
(put-text-property |
|||
start next 'face |
|||
(if background-prev |
|||
(cons `(background-color |
|||
. ,(colir-blend |
|||
(colir-color-parse background-prev) |
|||
(colir-color-parse (face-background face nil t)))) |
|||
prevn) |
|||
(list face prevn)) |
|||
object)))) |
|||
|
|||
(defun colir-blend-face-background (start end face &optional object) |
|||
"Append to the face property of the text from START to END the face FACE. |
|||
When the text already has a face with a non-plain background, |
|||
blend it with the background of FACE. |
|||
Optional argument OBJECT is the string or buffer containing the text. |
|||
See also `font-lock-append-text-property'." |
|||
(let (next prev prevn) |
|||
(while (/= start end) |
|||
(setq next (next-single-property-change start 'face object end)) |
|||
(setq prev (get-text-property start 'face object)) |
|||
(setq prevn (if (listp prev) |
|||
(cl-find-if #'atom prev) |
|||
prev)) |
|||
(cond |
|||
((or (keywordp (car-safe prev)) (consp (car-safe prev))) |
|||
(put-text-property start next 'face (cons face prev) object)) |
|||
((facep prevn) |
|||
(colir--blend-background start next prevn face object)) |
|||
(t |
|||
(put-text-property start next 'face face object))) |
|||
(setq start next)))) |
|||
|
|||
(provide 'colir) |
|||
|
|||
;;; colir.el ends here |
|||
@ -0,0 +1,18 @@ |
|||
This is the file .../info/dir, which contains the |
|||
topmost node of the Info hierarchy, called (dir)Top. |
|||
The first time you invoke Info you start off looking at this node. |
|||
|
|||
File: dir, Node: Top This is the top of the INFO tree |
|||
|
|||
This (the Directory node) gives a menu of major topics. |
|||
Typing "q" exits, "H" lists all Info commands, "d" returns here, |
|||
"h" gives a primer for first-timers, |
|||
"mEmacs<Return>" visits the Emacs manual, etc. |
|||
|
|||
In Emacs, you can click mouse button 2 on a menu item or cross reference |
|||
to select it. |
|||
|
|||
* Menu: |
|||
|
|||
Emacs |
|||
* Ivy: (ivy). Using Ivy for completion. |
|||
@ -0,0 +1,6 @@ |
|||
(setq package-user-dir |
|||
(expand-file-name |
|||
(format "~/.elpa/%s/elpa" |
|||
(concat emacs-version (when (getenv "MELPA_STABLE") "-stable"))))) |
|||
(package-initialize) |
|||
(add-to-list 'load-path default-directory) |
|||
@ -0,0 +1,166 @@ |
|||
;;; ivy-autoloads.el --- automatically extracted autoloads |
|||
;; |
|||
;;; Code: |
|||
|
|||
(add-to-list 'load-path (directory-file-name |
|||
(or (file-name-directory #$) (car load-path)))) |
|||
|
|||
|
|||
;;;### (autoloads nil "colir" "colir.el" (0 0 0 0)) |
|||
;;; Generated autoloads from colir.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "colir" '("colir-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil "ivy" "ivy.el" (0 0 0 0)) |
|||
;;; Generated autoloads from ivy.el |
|||
|
|||
(autoload 'ivy-resume "ivy" "\ |
|||
Resume the last completion session, or SESSION if non-nil. |
|||
With a prefix arg, try to restore a recorded completion session, |
|||
if one exists. |
|||
|
|||
\(fn &optional SESSION)" t nil) |
|||
|
|||
(autoload 'ivy-read "ivy" "\ |
|||
Read a string in the minibuffer, with completion. |
|||
|
|||
PROMPT is a string, normally ending in a colon and a space. |
|||
`ivy-count-format' is prepended to PROMPT during completion. |
|||
|
|||
COLLECTION is either a list of strings, a function, an alist, or |
|||
a hash table, supplied for `minibuffer-completion-table'. |
|||
|
|||
PREDICATE is applied to filter out the COLLECTION immediately. |
|||
This argument is for compatibility with `completing-read'. |
|||
|
|||
When REQUIRE-MATCH is non-nil, only members of COLLECTION can be |
|||
selected. |
|||
|
|||
If INITIAL-INPUT is non-nil, then insert that input in the |
|||
minibuffer initially. |
|||
|
|||
HISTORY is a name of a variable to hold the completion session |
|||
history. |
|||
|
|||
KEYMAP is composed with `ivy-minibuffer-map'. |
|||
|
|||
PRESELECT, when non-nil, determines which one of the candidates |
|||
matching INITIAL-INPUT to select initially. An integer stands |
|||
for the position of the desired candidate in the collection, |
|||
counting from zero. Otherwise, use the first occurrence of |
|||
PRESELECT in the collection. Comparison is first done with |
|||
`equal'. If that fails, and when applicable, match PRESELECT as |
|||
a regular expression. |
|||
|
|||
DEF is for compatibility with `completing-read'. |
|||
|
|||
UPDATE-FN is called each time the candidate list is re-displayed. |
|||
|
|||
When SORT is non-nil, `ivy-sort-functions-alist' determines how |
|||
to sort candidates before displaying them. |
|||
|
|||
ACTION is a function to call after selecting a candidate. |
|||
It takes one argument, the selected candidate. If COLLECTION is |
|||
an alist, the argument is a cons cell, otherwise it's a string. |
|||
|
|||
MULTI-ACTION, when non-nil, is called instead of ACTION when |
|||
there are marked candidates. It takes the list of candidates as |
|||
its only argument. When it's nil, ACTION is called on each marked |
|||
candidate. |
|||
|
|||
UNWIND is a function of no arguments to call before exiting. |
|||
|
|||
RE-BUILDER is a function transforming input text into a regex |
|||
pattern. |
|||
|
|||
MATCHER is a function which can override how candidates are |
|||
filtered based on user input. It takes a regex pattern and a |
|||
list of candidates, and returns the list of matching candidates. |
|||
|
|||
DYNAMIC-COLLECTION is a boolean specifying whether the list of |
|||
candidates is updated after each input by calling COLLECTION. |
|||
|
|||
EXTRA-PROPS is a plist that can be used to store |
|||
collection-specific session-specific data. |
|||
|
|||
CALLER is a symbol to uniquely identify the caller to `ivy-read'. |
|||
It is used, along with COLLECTION, to determine which |
|||
customizations apply to the current completion session. |
|||
|
|||
\(fn PROMPT COLLECTION &key PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY PRESELECT DEF KEYMAP UPDATE-FN SORT ACTION MULTI-ACTION UNWIND RE-BUILDER MATCHER DYNAMIC-COLLECTION EXTRA-PROPS CALLER)" nil nil) |
|||
|
|||
(autoload 'ivy-completing-read "ivy" "\ |
|||
Read a string in the minibuffer, with completion. |
|||
|
|||
This interface conforms to `completing-read' and can be used for |
|||
`completing-read-function'. |
|||
|
|||
PROMPT is a string that normally ends in a colon and a space. |
|||
COLLECTION is either a list of strings, an alist, an obarray, or a hash table. |
|||
PREDICATE limits completion to a subset of COLLECTION. |
|||
REQUIRE-MATCH is a boolean value or a symbol. See `completing-read'. |
|||
INITIAL-INPUT is a string inserted into the minibuffer initially. |
|||
HISTORY is a list of previously selected inputs. |
|||
DEF is the default value. |
|||
INHERIT-INPUT-METHOD is currently ignored. |
|||
|
|||
\(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY DEF INHERIT-INPUT-METHOD)" nil nil) |
|||
|
|||
(defvar ivy-mode nil "\ |
|||
Non-nil if Ivy mode is enabled. |
|||
See the `ivy-mode' command |
|||
for a description of this minor mode. |
|||
Setting this variable directly does not take effect; |
|||
either customize it (see the info node `Easy Customization') |
|||
or call the function `ivy-mode'.") |
|||
|
|||
(custom-autoload 'ivy-mode "ivy" nil) |
|||
|
|||
(autoload 'ivy-mode "ivy" "\ |
|||
Toggle Ivy mode on or off. |
|||
Turn Ivy mode on if ARG is positive, off otherwise. |
|||
Turning on Ivy mode sets `completing-read-function' to |
|||
`ivy-completing-read'. |
|||
|
|||
Global bindings: |
|||
\\{ivy-mode-map} |
|||
|
|||
Minibuffer bindings: |
|||
\\{ivy-minibuffer-map} |
|||
|
|||
\(fn &optional ARG)" t nil) |
|||
|
|||
(autoload 'ivy-switch-buffer "ivy" "\ |
|||
Switch to another buffer." t nil) |
|||
|
|||
(autoload 'ivy-switch-view "ivy" "\ |
|||
Switch to one of the window views stored by `ivy-push-view'." t nil) |
|||
|
|||
(autoload 'ivy-switch-buffer-other-window "ivy" "\ |
|||
Switch to another buffer in another window." t nil) |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ivy" '("ivy-" "with-ivy-window"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil "ivy-overlay" "ivy-overlay.el" (0 0 0 0)) |
|||
;;; Generated autoloads from ivy-overlay.el |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "ivy-overlay" '("ivy-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;;;### (autoloads nil nil ("elpa.el" "ivy-faces.el" "ivy-pkg.el") |
|||
;;;;;; (0 0 0 0)) |
|||
|
|||
;;;*** |
|||
|
|||
;; Local Variables: |
|||
;; version-control: never |
|||
;; no-byte-compile: t |
|||
;; no-update-autoloads: t |
|||
;; coding: utf-8 |
|||
;; End: |
|||
;;; ivy-autoloads.el ends here |
|||
@ -0,0 +1,138 @@ |
|||
;;; ivy-faces.el --- Faces for Ivy -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2020 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
;; Keywords: convenience |
|||
|
|||
;; This program is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation, either version 3 of the License, or |
|||
;; (at your option) any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; You should have received a copy of the GNU General Public License |
|||
;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;;; Code: |
|||
|
|||
(defgroup ivy-faces nil |
|||
"Font-lock faces for `ivy'." |
|||
:group 'ivy |
|||
:group 'faces) |
|||
|
|||
(defface ivy-current-match |
|||
'((((class color) (background light)) |
|||
:background "#1a4b77" :foreground "white" :extend t) |
|||
(((class color) (background dark)) |
|||
:background "#65a7e2" :foreground "black" :extend t)) |
|||
"Face used by Ivy for highlighting the current match.") |
|||
|
|||
(defface ivy-minibuffer-match-highlight |
|||
'((t :inherit highlight)) |
|||
"Face used by Ivy for highlighting the match under the cursor.") |
|||
|
|||
(defface ivy-minibuffer-match-face-1 |
|||
'((((class color) (background light)) |
|||
:background "#d3d3d3") |
|||
(((class color) (background dark)) |
|||
:background "#555555")) |
|||
"The background face for `ivy' minibuffer matches.") |
|||
|
|||
(defface ivy-minibuffer-match-face-2 |
|||
'((((class color) (background light)) |
|||
:background "#e99ce8" :weight bold) |
|||
(((class color) (background dark)) |
|||
:background "#777777" :weight bold)) |
|||
"Face for `ivy' minibuffer matches numbered 1 modulo 3.") |
|||
|
|||
(defface ivy-minibuffer-match-face-3 |
|||
'((((class color) (background light)) |
|||
:background "#bbbbff" :weight bold) |
|||
(((class color) (background dark)) |
|||
:background "#7777ff" :weight bold)) |
|||
"Face for `ivy' minibuffer matches numbered 2 modulo 3.") |
|||
|
|||
(defface ivy-minibuffer-match-face-4 |
|||
'((((class color) (background light)) |
|||
:background "#ffbbff" :weight bold) |
|||
(((class color) (background dark)) |
|||
:background "#8a498a" :weight bold)) |
|||
"Face for `ivy' minibuffer matches numbered 3 modulo 3.") |
|||
|
|||
(defface ivy-confirm-face |
|||
'((t :foreground "ForestGreen" :inherit minibuffer-prompt)) |
|||
"Face used by Ivy for a confirmation prompt.") |
|||
|
|||
(defface ivy-match-required-face |
|||
'((t :foreground "red" :inherit minibuffer-prompt)) |
|||
"Face used by Ivy for a match required prompt.") |
|||
|
|||
(defface ivy-subdir |
|||
'((t :inherit dired-directory)) |
|||
"Face used by Ivy for highlighting subdirs in the alternatives.") |
|||
|
|||
(defface ivy-org |
|||
'((t :inherit org-level-4)) |
|||
"Face used by Ivy for highlighting Org buffers in the alternatives.") |
|||
|
|||
(defface ivy-modified-buffer |
|||
'((t :inherit default)) |
|||
"Face used by Ivy for highlighting modified file visiting buffers.") |
|||
|
|||
(defface ivy-modified-outside-buffer |
|||
'((t :inherit default)) |
|||
"Face used by Ivy for highlighting file visiting buffers modified outside Emacs.") |
|||
|
|||
(defface ivy-remote |
|||
'((((class color) (background light)) |
|||
:foreground "#110099") |
|||
(((class color) (background dark)) |
|||
:foreground "#7B6BFF")) |
|||
"Face used by Ivy for highlighting remotes in the alternatives.") |
|||
|
|||
(defface ivy-virtual |
|||
'((t :inherit font-lock-builtin-face)) |
|||
"Face used by Ivy for matching virtual buffer names.") |
|||
|
|||
(defface ivy-action |
|||
'((t :inherit font-lock-builtin-face)) |
|||
"Face used by Ivy for displaying keys in `ivy-read-action'.") |
|||
|
|||
(defface ivy-highlight-face |
|||
'((t :inherit highlight)) |
|||
"Face used by Ivy to highlight certain candidates.") |
|||
|
|||
(defface ivy-prompt-match |
|||
'((t :inherit ivy-current-match)) |
|||
"Face used by Ivy for highlighting the selected prompt line.") |
|||
|
|||
(defface ivy-separator |
|||
'((t :inherit font-lock-doc-face)) |
|||
"Face for multiline source separator.") |
|||
|
|||
(defface ivy-grep-info |
|||
'((t :inherit compilation-info)) |
|||
"Face for highlighting grep information such as file names.") |
|||
|
|||
(defface ivy-grep-line-number |
|||
'((t :inherit compilation-line-number)) |
|||
"Face for displaying line numbers in grep messages.") |
|||
|
|||
(defface ivy-completions-annotations |
|||
'((t :inherit completions-annotations)) |
|||
"Face for displaying completion annotations.") |
|||
|
|||
(defface ivy-yanked-word |
|||
'((t :inherit highlight)) |
|||
"Face used to highlight yanked word.") |
|||
|
|||
(provide 'ivy-faces) |
|||
|
|||
;;; ivy-faces.el ends here |
|||
@ -0,0 +1,138 @@ |
|||
* Ivy Generic Help |
|||
|
|||
=ivy= is an Emacs incremental completion framework. |
|||
|
|||
- Narrow the list by typing some pattern, |
|||
- Multiple patterns are allowed by separating with a space, |
|||
- Select with ~C-n~ and ~C-p~, choose with ~RET~. |
|||
|
|||
** Help |
|||
|
|||
- ~C-h m~ :: Pop to this generic help buffer. |
|||
|
|||
** Basic Operations |
|||
*** Key bindings for navigation |
|||
|
|||
- ~C-n~ (=ivy-next-line=) :: next candidate. |
|||
- ~C-p~ (=ivy-previous-line=) :: previous candidate. |
|||
- ~C-v~ (=ivy-scroll-up-command=) :: next page. |
|||
- ~M-v~ (=ivy-scroll-down-command=) :: previous page. |
|||
- ~M-<~ (=ivy-beginning-of-buffer=) :: first candidate. |
|||
- ~M->~ (=ivy-end-of-buffer=) :: last candidate. |
|||
|
|||
*** Key bindings for single selection |
|||
|
|||
When selecting a candidate, an action is called on it. You can think |
|||
of an action as a function that takes the selected candidate as an |
|||
argument and does something with it. |
|||
|
|||
Ivy can offer several actions from which to choose. This can be |
|||
independently composed with whether you want to end completion when |
|||
the action is called. Depending on this, the short term is either |
|||
"calling an action" or "exiting with action". |
|||
|
|||
~C-m~ or ~RET~ (=ivy-done=) - exit with the current action. |
|||
|
|||
~M-o~ (=ivy-dispatching-done=) - select an action and exit with it. |
|||
|
|||
~C-j~ (=ivy-alt-done=) - when the candidate is a directory, enter |
|||
it. Otherwise, exit with the current action. |
|||
|
|||
~TAB~ (=ivy-partial-or-done=) - attempt partial completion, extending |
|||
the current input as much as possible. ~TAB TAB~ is the same as ~C-j~. |
|||
|
|||
~C-M-j~ (=ivy-immediate-done=) - exit with the current action, calling |
|||
it on the /current input/ instead of the current candidate. This is |
|||
useful especially when creating new files or directories - often the |
|||
input will match an existing file, which you don't want to select. |
|||
|
|||
~C-'~ (=ivy-avy=) - select a candidate from the current page with avy |
|||
and exit with the current action. |
|||
|
|||
** Advanced Operations |
|||
*** Key bindings for multiple selection |
|||
|
|||
For repeatedly applying multiple actions or acting on multiple |
|||
candidates, Ivy does not close the minibuffer between commands. It |
|||
keeps the minibuffer open for applying subsequent actions. |
|||
|
|||
Adding an extra meta key to the normal key chord invokes the special |
|||
version of the regular commands that enables applying multiple |
|||
actions. |
|||
|
|||
~C-M-m~ (=ivy-call=) is the non-exiting version of ~C-m~ (=ivy-done=). |
|||
|
|||
~C-M-n~ (=ivy-next-line-and-call=) combines ~C-n~ and ~C-M-m~. |
|||
|
|||
~C-M-p~ (=ivy-previous-line-and-call=) combines ~C-p~ and ~C-M-m~. |
|||
|
|||
~C-M-o~ (=ivy-dispatching-call=) is a non-exiting version of ~M-o~ |
|||
(=ivy-dispatching-done=). |
|||
|
|||
*** Key bindings that alter the minibuffer input |
|||
|
|||
~M-n~ (=ivy-next-history-element=) select the next history element or |
|||
symbol/URL at point. |
|||
|
|||
~M-p~ (=ivy-previous-history-element=) select the previous history |
|||
element. |
|||
|
|||
~C-r~ (=ivy-reverse-i-search=) start a recursive completion session to |
|||
select a history element. |
|||
|
|||
~M-i~ (=ivy-insert-current=) insert the current candidate into the |
|||
minibuffer. Useful for copying and renaming files, for example: ~M-i~ |
|||
to insert the original file name string, edit it, and then ~C-m~ to |
|||
complete the renaming. |
|||
|
|||
~M-j~ (=ivy-yank-word=) insert the sub-word at point into the |
|||
minibuffer. |
|||
|
|||
~S-SPC~ (=ivy-restrict-to-matches=) deletes the current input, and |
|||
resets the candidates list to the currently restricted matches. This |
|||
is how Ivy provides narrowing in successive tiers. |
|||
|
|||
*** Other key bindings |
|||
|
|||
~M-w~ (=ivy-kill-ring-save=) copies the selected candidates to the |
|||
kill ring; when the region is active, copies the active region. |
|||
|
|||
*** Saving the current completion session to a buffer |
|||
|
|||
~C-c C-o~ (=ivy-occur=) saves the current candidates to a new buffer; |
|||
the list is active in the new buffer. |
|||
|
|||
~RET~ or ~mouse-1~ in the new buffer calls the appropriate action on |
|||
the selected candidate. |
|||
|
|||
Ivy has no limit on the number of active buffers like these. |
|||
|
|||
Ivy takes care of making these buffer names unique. It applies |
|||
descriptive names, for example: =*ivy-occur counsel-describe-variable |
|||
"function$*=. |
|||
|
|||
*** Global key bindings |
|||
|
|||
=ivy-resume= recalls the state of the completion session just before |
|||
its last exit. Useful after an accidental ~C-m~ (=ivy-done=). |
|||
Recommended global binding: ~C-c C-r~. |
|||
|
|||
*** Hydra in the minibuffer |
|||
|
|||
~C-o~ (=hydra-ivy/body=) invokes Hydra menus with key shortcuts. |
|||
|
|||
When in Hydra, ~C-o~ or ~i~ resumes editing. |
|||
|
|||
Hydra reduces key strokes, for example: ~C-n C-n C-n C-n~ is ~C-o |
|||
jjjj~ in Hydra. Besides certain shorter keys, Hydra shows useful info |
|||
such as case folding and the current action. |
|||
|
|||
Additionally, here are the keys that are otherwise not bound: |
|||
|
|||
- ~<~ and ~>~ adjust the height of the minibuffer. |
|||
- ~c~ (=ivy-toggle-calling=) - toggle calling the current action each |
|||
time a different candidate is selected. |
|||
- ~M~ (=ivy-rotate-preferred-builders=) - rotate regex matcher. |
|||
- ~w~ and ~s~ scroll the actions list. |
|||
|
|||
Minibuffer editing is disabled when Hydra is active. |
|||
@ -0,0 +1,155 @@ |
|||
;;; ivy-overlay.el --- Overlay display functions for Ivy -*- lexical-binding: t -*- |
|||
|
|||
;; Copyright (C) 2016-2019 Free Software Foundation, Inc. |
|||
|
|||
;; Author: Oleh Krehel <ohwoeowho@gmail.com> |
|||
;; Keywords: convenience |
|||
|
|||
;; This program is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation, either version 3 of the License, or |
|||
;; (at your option) any later version. |
|||
|
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
|
|||
;; You should have received a copy of the GNU General Public License |
|||
;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This package allows to setup Ivy's completion at point to actually |
|||
;; show the candidates and the input at point, instead of in the |
|||
;; minibuffer. |
|||
|
|||
;;; Code: |
|||
|
|||
(eval-when-compile |
|||
(require 'subr-x)) |
|||
|
|||
(defface ivy-cursor |
|||
'((((class color) (background light)) |
|||
:background "black" :foreground "white") |
|||
(((class color) (background dark)) |
|||
:background "white" :foreground "black")) |
|||
"Cursor face for inline completion." |
|||
:group 'ivy-faces) |
|||
|
|||
(defvar ivy--old-cursor-type t) |
|||
|
|||
(defvar ivy-overlay-at nil |
|||
"Overlay variable for `ivy-display-function-overlay'.") |
|||
|
|||
(declare-function ivy--truncate-string "ivy") |
|||
|
|||
(defun ivy-left-pad (str width) |
|||
"Return STR, but with each line indented by WIDTH spaces. |
|||
Lines are truncated to the window width." |
|||
(let ((padding (make-string width ?\s))) |
|||
(mapconcat (lambda (x) |
|||
(ivy--truncate-string (concat padding x) |
|||
(1- (+ (window-width) |
|||
(window-hscroll))))) |
|||
(split-string str "\n") |
|||
"\n"))) |
|||
|
|||
(defun ivy-overlay-cleanup () |
|||
"Clean up after `ivy-display-function-overlay'." |
|||
(when (overlayp ivy-overlay-at) |
|||
(delete-overlay ivy-overlay-at) |
|||
(setq ivy-overlay-at nil)) |
|||
(unless cursor-type |
|||
(setq cursor-type ivy--old-cursor-type)) |
|||
(when (fboundp 'company-abort) |
|||
(company-abort))) |
|||
|
|||
(defvar ivy-height) |
|||
|
|||
(defun ivy-overlay-show-after (str) |
|||
"Display STR in an overlay at point. |
|||
|
|||
First, fill each line of STR with spaces to the current column. |
|||
Then attach the overlay to the character before point." |
|||
(if ivy-overlay-at |
|||
(progn |
|||
(move-overlay ivy-overlay-at (1- (point)) (line-end-position)) |
|||
(overlay-put ivy-overlay-at 'invisible nil)) |
|||
(let ((available-height (- (window-height) (count-lines (window-start) (point)) 1))) |
|||
(unless (>= available-height ivy-height) |
|||
(recenter (- (window-height) ivy-height 2)))) |
|||
(setq ivy-overlay-at (make-overlay (1- (point)) (line-end-position))) |
|||
;; Specify face to avoid clashing with other overlays. |
|||
(overlay-put ivy-overlay-at 'face 'default) |
|||
(overlay-put ivy-overlay-at 'priority 9999)) |
|||
(overlay-put ivy-overlay-at 'display str) |
|||
(overlay-put ivy-overlay-at 'after-string "")) |
|||
|
|||
(declare-function org-current-level "org") |
|||
(declare-function org-at-heading-p "org") |
|||
(defvar org-indent-indentation-per-level) |
|||
(defvar ivy-height) |
|||
(defvar ivy-last) |
|||
(defvar ivy-text) |
|||
(defvar ivy-completion-beg) |
|||
(declare-function ivy--get-window "ivy") |
|||
(declare-function ivy-state-current "ivy") |
|||
(declare-function ivy-state-window "ivy") |
|||
|
|||
(defun ivy-overlay-impossible-p (_str) |
|||
(or |
|||
(and (eq major-mode 'org-mode) |
|||
(plist-get (text-properties-at (point)) 'src-block)) |
|||
(<= (window-height) (+ ivy-height 2)) |
|||
(= (point) (point-min)) |
|||
(< (- (+ (window-width) (window-hscroll)) (current-column)) |
|||
30))) |
|||
|
|||
(defun ivy-display-function-overlay (str) |
|||
"Called from the minibuffer, display STR in an overlay in Ivy window. |
|||
Hide the minibuffer contents and cursor." |
|||
(if (save-selected-window |
|||
(select-window (ivy-state-window ivy-last)) |
|||
(ivy-overlay-impossible-p str)) |
|||
(let ((buffer-undo-list t)) |
|||
(save-excursion |
|||
(forward-line 1) |
|||
(insert str))) |
|||
(add-face-text-property (minibuffer-prompt-end) (point-max) |
|||
'(:foreground "white")) |
|||
(setq cursor-type nil) |
|||
(with-selected-window (ivy--get-window ivy-last) |
|||
(when cursor-type |
|||
(setq ivy--old-cursor-type cursor-type)) |
|||
(setq cursor-type nil) |
|||
(let ((overlay-str |
|||
(apply |
|||
#'concat |
|||
(buffer-substring (max (point-min) (1- (point))) (point)) |
|||
ivy-text |
|||
(and (eolp) " ") |
|||
(buffer-substring (point) (line-end-position)) |
|||
(and (> (length str) 0) |
|||
(list "\n" |
|||
(ivy-left-pad |
|||
(string-remove-prefix "\n" str) |
|||
(+ |
|||
(if (and (eq major-mode 'org-mode) |
|||
(bound-and-true-p org-indent-mode)) |
|||
(if (org-at-heading-p) |
|||
(1- (org-current-level)) |
|||
(* org-indent-indentation-per-level (or (org-current-level) 1))) |
|||
0) |
|||
(save-excursion |
|||
(when ivy-completion-beg |
|||
(goto-char ivy-completion-beg)) |
|||
(current-column))))))))) |
|||
(let ((cursor-offset (1+ (length ivy-text)))) |
|||
(add-face-text-property cursor-offset (1+ cursor-offset) |
|||
'ivy-cursor t overlay-str)) |
|||
(ivy-overlay-show-after overlay-str))))) |
|||
|
|||
(provide 'ivy-overlay) |
|||
|
|||
;;; ivy-overlay.el ends here |
|||
@ -0,0 +1,12 @@ |
|||
(define-package "ivy" "20210216.1611" "Incremental Vertical completYon" |
|||
'((emacs "24.5")) |
|||
:commit "0965e2375e2539fcc62b44b7b8f680d40c0b535a" :authors |
|||
'(("Oleh Krehel" . "ohwoeowho@gmail.com")) |
|||
:maintainer |
|||
'("Oleh Krehel" . "ohwoeowho@gmail.com") |
|||
:keywords |
|||
'("matching") |
|||
:url "https://github.com/abo-abo/swiper") |
|||
;; Local Variables: |
|||
;; no-byte-compile: t |
|||
;; End: |
|||
5295
elpa/ivy-20210216.1611/ivy.el
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1972
elpa/ivy-20210216.1611/ivy.info
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,2 +0,0 @@ |
|||
;;; Generated package description from /home/raphael/.emacs.d/elpa/markdown-mode-20210123.1547/markdown-mode.el -*- no-byte-compile: t -*- |
|||
(define-package "markdown-mode" "20210123.1547" "Major mode for Markdown-formatted text" '((emacs "25.1")) :commit "779a4c637719f5a192c128ed60ecffed3ff1760c" :authors '(("Jason R. Blevins" . "jblevins@xbeta.org")) :maintainer '("Jason R. Blevins" . "jblevins@xbeta.org") :keywords '("markdown" "github flavored markdown" "itex") :url "https://jblevins.org/projects/markdown-mode/") |
|||
@ -0,0 +1,2 @@ |
|||
;;; Generated package description from /home/raphael/.emacs.d/elpa/markdown-mode-20210216.852/markdown-mode.el -*- no-byte-compile: t -*- |
|||
(define-package "markdown-mode" "20210216.852" "Major mode for Markdown-formatted text" '((emacs "25.1")) :commit "377ce39ffe69f058994ac4e98bde8cfb58661406" :authors '(("Jason R. Blevins" . "jblevins@xbeta.org")) :maintainer '("Jason R. Blevins" . "jblevins@xbeta.org") :keywords '("markdown" "github flavored markdown" "itex") :url "https://jblevins.org/projects/markdown-mode/") |
|||
@ -0,0 +1,36 @@ |
|||
;;; nginx-mode-autoloads.el --- automatically extracted autoloads |
|||
;; |
|||
;;; Code: |
|||
|
|||
(add-to-list 'load-path (directory-file-name |
|||
(or (file-name-directory #$) (car load-path)))) |
|||
|
|||
|
|||
;;;### (autoloads nil "nginx-mode" "nginx-mode.el" (0 0 0 0)) |
|||
;;; Generated autoloads from nginx-mode.el |
|||
|
|||
(autoload 'nginx-mode "nginx-mode" "\ |
|||
Major mode for highlighting nginx config files. |
|||
|
|||
The variable nginx-indent-level controls the amount of indentation. |
|||
\\{nginx-mode-map} |
|||
|
|||
\(fn)" t nil) |
|||
|
|||
(add-to-list 'auto-mode-alist '("nginx\\.conf\\'" . nginx-mode)) |
|||
|
|||
(add-to-list 'auto-mode-alist '("/nginx/.+\\.conf\\'" . nginx-mode)) |
|||
|
|||
(add-to-list 'magic-fallback-mode-alist '("\\(?:.*\n\\)*\\(?:http\\|server\\|location .+\\|upstream .+\\)[ \n\11]+{" . nginx-mode)) |
|||
|
|||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "nginx-mode" '("nginx-"))) |
|||
|
|||
;;;*** |
|||
|
|||
;; Local Variables: |
|||
;; version-control: never |
|||
;; no-byte-compile: t |
|||
;; no-update-autoloads: t |
|||
;; coding: utf-8 |
|||
;; End: |
|||
;;; nginx-mode-autoloads.el ends here |
|||
@ -0,0 +1,2 @@ |
|||
;;; Generated package description from /home/raphael/.emacs.d/elpa/nginx-mode-1.1.9/nginx-mode.el -*- no-byte-compile: t -*- |
|||
(define-package "nginx-mode" "1.1.9" "major mode for editing nginx config files" 'nil :commit "a2bab83c2eb233d57d76b236e7c141c2ccc97005" :authors '(("Andrew J Cosgriff" . "andrew@cosgriff.name")) :maintainer '("Andrew J Cosgriff" . "andrew@cosgriff.name") :keywords '("languages" "nginx")) |
|||
@ -0,0 +1,203 @@ |
|||
;;; nginx-mode.el --- major mode for editing nginx config files |
|||
|
|||
;; Copyright 2010 Andrew J Cosgriff <andrew@cosgriff.name> |
|||
|
|||
;; Author: Andrew J Cosgriff <andrew@cosgriff.name> |
|||
;; Maintainer: Andrew J Cosgriff <andrew@cosgriff.name> |
|||
;; Created: 15 Oct 2010 |
|||
;; Version: 1.1.9 |
|||
;; Package-Version: 1.1.9 |
|||
;; Package-Commit: a2bab83c2eb233d57d76b236e7c141c2ccc97005 |
|||
;; Keywords: languages, nginx |
|||
|
|||
;; available from http://github.com/ajc/nginx-mode |
|||
|
|||
;; This program is free software; you can redistribute it and/or modify |
|||
;; it under the terms of the GNU General Public License as published by |
|||
;; the Free Software Foundation; either version 2, or (at your option) |
|||
;; any later version. |
|||
;; |
|||
;; This program is distributed in the hope that it will be useful, |
|||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
;; GNU General Public License for more details. |
|||
;; |
|||
;; You should have received a copy of the GNU General Public License |
|||
;; along with this program; if not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
;;; Commentary: |
|||
|
|||
;; This is a quick mode for editing Nginx config files, as I didn't find |
|||
;; anything else around that did quite this much. |
|||
|
|||
;; Many thanks to the authors of puppet-mode.el, from where I found a |
|||
;; useful indentation function that I've modified to suit this situation. |
|||
|
|||
;; Put this file into your load-path and the following into your ~/.emacs: |
|||
;; (require 'nginx-mode) |
|||
|
|||
;;; Code: |
|||
|
|||
|
|||
;;;;########################################################################## |
|||
;;;; User Options, Variables |
|||
;;;;########################################################################## |
|||
|
|||
(defcustom nginx-indent-level 4 |
|||
"*Indentation of Nginx statements." |
|||
:type 'integer :group 'nginx) |
|||
|
|||
(defcustom nginx-indent-tabs-mode nil |
|||
"*Indentation can insert tabs in nginx mode if this is non-nil." |
|||
:type 'boolean :group 'nginx) |
|||
|
|||
(defvar nginx-mode-syntax-table |
|||
(let ((table (make-syntax-table))) |
|||
(modify-syntax-entry ?# "< b" table) |
|||
(modify-syntax-entry ?\n "> b" table) |
|||
table) |
|||
"Syntax table for `nginx-mode'.") |
|||
|
|||
(defvar nginx-font-lock-keywords |
|||
(list '("^\\([ \t]+\\)?\\([A-Za-z09_]+\\)" 2 font-lock-keyword-face t) |
|||
;; uncomment the next one if you want your eyes to bleed |
|||
;; (it'll highlight parentheses and curly braces) |
|||
;;'("\\(\{\\|\}\\|\(\\|\)\\)" . font-lock-pseudo-keyword-face) |
|||
'("^\\([ \t]+\\)?rewrite[ \t]+.+[ \t]+\\(permanent\\|redirect\\|break\\|last\\);$" 2 font-lock-function-name-face) |
|||
'("\\(\$[0-9]+\\)[^0-9]" 1 font-lock-constant-face) |
|||
'("\$[A-Za-z0-9_\-]+" . font-lock-variable-name-face) |
|||
'("[ \t]+\\(on\\|off\\);$" 1 font-lock-constant-face) |
|||
'("[A-Za-z0-9_\-]+\\([ \t]+[^ \t\n]+\\)?[ \t]+\\([^ \t\n]+\\)[ \t]+{" 2 font-lock-function-name-face))) |
|||
|
|||
|
|||
;;;;########################################################################## |
|||
;;;; Code |
|||
;;;;########################################################################## |
|||
|
|||
(defun nginx-block-indent () |
|||
"If point is in a block, return the indentation of the first line of that |
|||
block (the line containing the opening brace). Used to set the indentation |
|||
of the closing brace of a block." |
|||
(save-excursion |
|||
(save-match-data |
|||
(let ((opoint (point)) |
|||
(apoint (search-backward "{" nil t))) |
|||
(when apoint |
|||
;; This is a bit of a hack and doesn't allow for strings. We really |
|||
;; want to parse by sexps at some point. |
|||
(let ((close-braces (count-matches "}" apoint opoint)) |
|||
(open-braces 0)) |
|||
(while (and apoint (> close-braces open-braces)) |
|||
(setq apoint (search-backward "{" nil t)) |
|||
(when apoint |
|||
(setq close-braces (count-matches "}" apoint opoint)) |
|||
(setq open-braces (1+ open-braces))))) |
|||
(if apoint |
|||
(current-indentation) |
|||
nil)))))) |
|||
|
|||
|
|||
(defun nginx-comment-line-p () |
|||
"Return non-nil iff this line is a comment." |
|||
(save-excursion |
|||
(save-match-data |
|||
(beginning-of-line) |
|||
(looking-at "^\\s-*#")))) |
|||
|
|||
(defun nginx-indent-line () |
|||
"Indent current line as nginx code." |
|||
(interactive) |
|||
(beginning-of-line) |
|||
(if (bobp) |
|||
(indent-line-to 0) ; First line is always non-indented |
|||
(let ((not-indented t) |
|||
(block-indent (nginx-block-indent)) |
|||
cur-indent) |
|||
(cond |
|||
((and (looking-at "^\\s-*}\\s-*$") block-indent) |
|||
;; This line contains a closing brace and we're at the inner |
|||
;; block, so we should indent it matching the indentation of |
|||
;; the opening brace of the block. |
|||
(setq cur-indent block-indent)) |
|||
(t |
|||
;; Otherwise, we did not start on a block-ending-only line. |
|||
(save-excursion |
|||
;; Iterate backwards until we find an indentation hint |
|||
(while not-indented |
|||
(forward-line -1) |
|||
(cond |
|||
;; Comment lines are ignored unless we're at the start of the |
|||
;; buffer. |
|||
((nginx-comment-line-p) |
|||
(if (bobp) |
|||
(setq not-indented nil))) |
|||
|
|||
;; Brace or paren on a line by itself will already be indented to |
|||
;; the right level, so we can cheat and stop there. |
|||
((looking-at "^\\s-*}\\s-*") |
|||
(setq cur-indent (current-indentation)) |
|||
(setq not-indented nil)) |
|||
|
|||
;; Indent by one level more than the start of our block. We lose |
|||
;; if there is more than one block opened and closed on the same |
|||
;; line but it's still unbalanced; hopefully people don't do that. |
|||
((looking-at "^.*{[^\n}]*$") |
|||
(setq cur-indent (+ (current-indentation) nginx-indent-level)) |
|||
(setq not-indented nil)) |
|||
|
|||
;; Start of buffer. |
|||
((bobp) |
|||
(setq not-indented nil))))))) |
|||
|
|||
;; We've figured out the indentation, so do it. |
|||
(if (and cur-indent (> cur-indent 0)) |
|||
(indent-line-to cur-indent) |
|||
(indent-line-to 0))))) |
|||
|
|||
|
|||
(defvar nginx-mode-map |
|||
(let |
|||
((map (make-sparse-keymap))) |
|||
(define-key map "\C-j" 'newline-and-indent) |
|||
(define-key map "\C-m" 'newline-and-indent) |
|||
map) |
|||
"Keymap for editing nginx config files.") |
|||
|
|||
;;;###autoload |
|||
(define-derived-mode nginx-mode prog-mode "Nginx" |
|||
"Major mode for highlighting nginx config files. |
|||
|
|||
The variable nginx-indent-level controls the amount of indentation. |
|||
\\{nginx-mode-map}" |
|||
:syntax-table nginx-mode-syntax-table |
|||
|
|||
(use-local-map nginx-mode-map) |
|||
|
|||
(set (make-local-variable 'comment-start) "# ") |
|||
(set (make-local-variable 'comment-start-skip) "#+ *") |
|||
(set (make-local-variable 'comment-end) "") |
|||
(set (make-local-variable 'comment-auto-fill-only-comments) t) |
|||
|
|||
(set (make-local-variable 'indent-line-function) 'nginx-indent-line) |
|||
(set (make-local-variable 'indent-tabs-mode) nginx-indent-tabs-mode) |
|||
(set (make-local-variable 'require-final-newline) t) |
|||
(set (make-local-variable 'paragraph-ignore-fill-prefix) t) |
|||
(set (make-local-variable 'paragraph-start) "\f\\|[ ]*$\\|#$") |
|||
(set (make-local-variable 'paragraph-separate) "\\([ \f]*\\|#\\)$") |
|||
|
|||
(set (make-local-variable 'font-lock-defaults) |
|||
'(nginx-font-lock-keywords nil))) |
|||
|
|||
;;;###autoload |
|||
(add-to-list 'auto-mode-alist '("nginx\\.conf\\'" . nginx-mode)) |
|||
;;;###autoload |
|||
(add-to-list 'auto-mode-alist '("/nginx/.+\\.conf\\'" . nginx-mode)) |
|||
;;;###autoload |
|||
(add-to-list |
|||
'magic-fallback-mode-alist |
|||
'("\\(?:.*\n\\)*\\(?:http\\|server\\|location .+\\|upstream .+\\)[ \n\t]+{" |
|||
. nginx-mode)) |
|||
|
|||
(provide 'nginx-mode) |
|||
|
|||
;;; nginx-mode.el ends here |
|||
@ -1,2 +0,0 @@ |
|||
;;; Generated package description from /data/data/com.termux/files/home/.emacs.d/elpa/request-20201026.2324/request.el -*- no-byte-compile: t -*- |
|||
(define-package "request" "20201026.2324" "Compatible layer for URL request in Emacs" '((emacs "24.4")) :commit "0183da84cb45eb94da996cd2eab714ef0d7504cc" :authors '(("Takafumi Arakaki <aka.tkf at gmail.com>")) :maintainer '("Takafumi Arakaki <aka.tkf at gmail.com>") :url "https://github.com/tkf/emacs-request") |
|||
@ -0,0 +1,2 @@ |
|||
;;; Generated package description from /home/raphael/.emacs.d/elpa/request-20210214.37/request.el -*- no-byte-compile: t -*- |
|||
(define-package "request" "20210214.37" "Compatible layer for URL request" '((emacs "24.4")) :commit "accd430ee706f5b10fb20003b06bd8209bcdaa82" :authors '(("Takafumi Arakaki <aka.tkf at gmail.com>")) :maintainer '("Takafumi Arakaki <aka.tkf at gmail.com>") :url "https://github.com/tkf/emacs-request") |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue