update of packages
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
'((avy "0.5.0"))
|
'((avy "0.5.0"))
|
||||||
:commit "77115afc1b0b9f633084cf7479c767988106c196" :authors
|
:commit "77115afc1b0b9f633084cf7479c767988106c196" :authors
|
||||||
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Oleh Krehel" . "ohwoeowho@gmail.com")
|
'("Oleh Krehel" . "ohwoeowho@gmail.com")
|
||||||
:keywords
|
:keywords
|
||||||
|
|||||||
16
lisp/all-the-icons-ivy-rich/all-the-icons-ivy-rich-pkg.el
Normal file
16
lisp/all-the-icons-ivy-rich/all-the-icons-ivy-rich-pkg.el
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
(define-package "all-the-icons-ivy-rich" "20230420.1234" "Better experience with icons for ivy"
|
||||||
|
'((emacs "25.1")
|
||||||
|
(ivy-rich "0.1.0")
|
||||||
|
(all-the-icons "2.2.0"))
|
||||||
|
:commit "c098cc85123a401b0ab8f2afd3a25853e61d7d28" :authors
|
||||||
|
'(("Vincent Zhang" . "seagle0128@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Vincent Zhang" . "seagle0128@gmail.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Vincent Zhang" . "seagle0128@gmail.com")
|
||||||
|
:keywords
|
||||||
|
'("convenience" "icons" "ivy")
|
||||||
|
:url "https://github.com/seagle0128/all-the-icons-ivy-rich")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
||||||
;; Homepage: https://github.com/seagle0128/all-the-icons-ivy-rich
|
;; Homepage: https://github.com/seagle0128/all-the-icons-ivy-rich
|
||||||
;; Version: 1.8.1
|
;; Version: 1.9.0
|
||||||
;; Package-Version: 20221202.1336
|
|
||||||
;; Package-Commit: c5839098664104ade4dfcefa0ba716215c4f7812
|
|
||||||
;; Package-Requires: ((emacs "25.1") (ivy-rich "0.1.0") (all-the-icons "2.2.0"))
|
;; Package-Requires: ((emacs "25.1") (ivy-rich "0.1.0") (all-the-icons "2.2.0"))
|
||||||
;; Keywords: convenience, icons, ivy
|
;; Keywords: convenience, icons, ivy
|
||||||
|
|
||||||
@@ -133,7 +131,7 @@
|
|||||||
:group 'all-the-icons-ivy-rich)
|
:group 'all-the-icons-ivy-rich)
|
||||||
|
|
||||||
(defface all-the-icons-ivy-rich-size-face
|
(defface all-the-icons-ivy-rich-size-face
|
||||||
'((t (:inherit shadow)))
|
'((t (:inherit font-lock-constant-face)))
|
||||||
"Face used for buffer size."
|
"Face used for buffer size."
|
||||||
:group 'all-the-icons-ivy-rich)
|
:group 'all-the-icons-ivy-rich)
|
||||||
|
|
||||||
@@ -575,14 +573,12 @@ This value is adjusted depending on the `window-width'."
|
|||||||
counsel-find-library
|
counsel-find-library
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-library-icon)
|
((all-the-icons-ivy-rich-library-icon)
|
||||||
(all-the-icons-ivy-rich-library-transformer (:width 0.3))
|
(all-the-icons-ivy-rich-library-transformer))
|
||||||
(all-the-icons-ivy-rich-library-path (:face all-the-icons-ivy-rich-path-face)))
|
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
counsel-load-library
|
counsel-load-library
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-library-icon)
|
((all-the-icons-ivy-rich-library-icon)
|
||||||
(all-the-icons-ivy-rich-library-transformer (:width 0.3))
|
(all-the-icons-ivy-rich-library-transformer))
|
||||||
(all-the-icons-ivy-rich-library-path (:face all-the-icons-ivy-rich-path-face)))
|
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
counsel-load-theme
|
counsel-load-theme
|
||||||
(:columns
|
(:columns
|
||||||
@@ -602,7 +598,7 @@ This value is adjusted depending on the `window-width'."
|
|||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
counsel-git-checkout
|
counsel-git-checkout
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-git-branch-icon)
|
((all-the-icons-ivy-rich-git-commit-icon)
|
||||||
(ivy-rich-candidate))
|
(ivy-rich-candidate))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
counsel-list-processes
|
counsel-list-processes
|
||||||
@@ -737,15 +733,10 @@ This value is adjusted depending on the `window-width'."
|
|||||||
((all-the-icons-ivy-rich-function-icon)
|
((all-the-icons-ivy-rich-function-icon)
|
||||||
(counsel-M-x-transformer (:width 0.3))
|
(counsel-M-x-transformer (:width 0.3))
|
||||||
(ivy-rich-counsel-function-docstring (:face all-the-icons-ivy-rich-doc-face))))
|
(ivy-rich-counsel-function-docstring (:face all-the-icons-ivy-rich-doc-face))))
|
||||||
|
|
||||||
project-switch-project
|
project-switch-project
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-file-icon)
|
((all-the-icons-ivy-rich-project-icon)
|
||||||
(all-the-icons-ivy-rich-project-name (:width 0.4))
|
(all-the-icons-ivy-rich-project-name))
|
||||||
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
|
||||||
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
project-find-file
|
project-find-file
|
||||||
(:columns
|
(:columns
|
||||||
@@ -768,16 +759,7 @@ This value is adjusted depending on the `window-width'."
|
|||||||
project-dired
|
project-dired
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-file-icon)
|
((all-the-icons-ivy-rich-file-icon)
|
||||||
(all-the-icons-ivy-rich-project-name (:width 0.4))
|
(ivy-rich-candidate (:width 0.4))
|
||||||
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
|
||||||
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
|
||||||
:delimiter "\t")
|
|
||||||
project-vc-dir
|
|
||||||
(:columns
|
|
||||||
((all-the-icons-ivy-rich-file-icon)
|
|
||||||
(all-the-icons-ivy-rich-project-name (:width 0.4))
|
|
||||||
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
||||||
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
||||||
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
||||||
@@ -817,6 +799,51 @@ This value is adjusted depending on the `window-width'."
|
|||||||
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
package-recompile
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-package-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.25))
|
||||||
|
(all-the-icons-ivy-rich-package-version (:width 16 :face all-the-icons-ivy-rich-version-face))
|
||||||
|
(all-the-icons-ivy-rich-package-status (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
package-update
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-package-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.25))
|
||||||
|
(all-the-icons-ivy-rich-package-version (:width 16 :face all-the-icons-ivy-rich-version-face))
|
||||||
|
(all-the-icons-ivy-rich-package-status (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
package-vc-checkout
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-package-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.25))
|
||||||
|
(all-the-icons-ivy-rich-package-version (:width 16 :face all-the-icons-ivy-rich-version-face))
|
||||||
|
(all-the-icons-ivy-rich-package-status (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
package-vc-install
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-package-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.25))
|
||||||
|
(all-the-icons-ivy-rich-package-version (:width 16 :face all-the-icons-ivy-rich-version-face))
|
||||||
|
(all-the-icons-ivy-rich-package-status (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
package-vc-update
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-package-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.25))
|
||||||
|
(all-the-icons-ivy-rich-package-version (:width 16 :face all-the-icons-ivy-rich-version-face))
|
||||||
|
(all-the-icons-ivy-rich-package-status (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-package-archive-summary (:width 7 :face all-the-icons-ivy-rich-archive-face))
|
||||||
|
(all-the-icons-ivy-rich-package-install-summary (:face all-the-icons-ivy-rich-pacage-desc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
|
||||||
;; persp
|
;; persp
|
||||||
persp-switch-to-buffer
|
persp-switch-to-buffer
|
||||||
@@ -903,7 +930,7 @@ This value is adjusted depending on the `window-width'."
|
|||||||
(lambda (cand) (get-buffer cand))
|
(lambda (cand) (get-buffer cand))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
|
||||||
all-the-icons-ivy-rich-kill-buffer
|
kill-buffer
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-buffer-icon)
|
((all-the-icons-ivy-rich-buffer-icon)
|
||||||
(ivy-switch-buffer-transformer (:width 0.3))
|
(ivy-switch-buffer-transformer (:width 0.3))
|
||||||
@@ -931,10 +958,40 @@ This value is adjusted depending on the `window-width'."
|
|||||||
|
|
||||||
customize-group
|
customize-group
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-settings-icon)
|
((all-the-icons-ivy-rich-group-settings-icon)
|
||||||
(ivy-rich-candidate (:width 0.3))
|
(ivy-rich-candidate (:width 0.3))
|
||||||
(all-the-icons-ivy-rich-custom-group-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
(all-the-icons-ivy-rich-custom-group-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
customize-group-other-window
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-group-settings-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-custom-group-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
customize-option
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-variable-settings-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-custom-variable-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
customize-option-other-window
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-variable-settings-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-custom-variable-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
customize-variable
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-variable-settings-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-custom-variable-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
customize-variable-other-window
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-variable-settings-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-custom-variable-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
|
||||||
describe-character-set
|
describe-character-set
|
||||||
(:columns
|
(:columns
|
||||||
@@ -956,6 +1013,13 @@ This value is adjusted depending on the `window-width'."
|
|||||||
(ivy-rich-candidate))
|
(ivy-rich-candidate))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
|
||||||
|
describe-input-method
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-input-method-icon)
|
||||||
|
(ivy-rich-candidate (:width 0.3))
|
||||||
|
(all-the-icons-ivy-rich-input-method-docstring (:face all-the-icons-ivy-rich-doc-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
|
||||||
set-input-method
|
set-input-method
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-input-method-icon)
|
((all-the-icons-ivy-rich-input-method-icon)
|
||||||
@@ -993,24 +1057,68 @@ This value is adjusted depending on the `window-width'."
|
|||||||
(ivy-rich-candidate (:face all-the-icons-ivy-rich-string-face)))
|
(ivy-rich-candidate (:face all-the-icons-ivy-rich-string-face)))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
|
||||||
|
lsp-install-server
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-lsp-icon)
|
||||||
|
(ivy-rich-candidate))
|
||||||
|
:delimiter "\t")
|
||||||
|
lsp-update-server
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-lsp-icon)
|
||||||
|
(ivy-rich-candidate))
|
||||||
|
:delimiter "\t")
|
||||||
|
lsp-uninstall-server
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-lsp-icon)
|
||||||
|
(ivy-rich-candidate))
|
||||||
|
:delimiter "\t")
|
||||||
lsp-ivy-workspace-folders-remove
|
lsp-ivy-workspace-folders-remove
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-dir-icon)
|
((all-the-icons-ivy-rich-dir-icon)
|
||||||
(all-the-icons-ivy-rich-project-name (:width 0.4))
|
(ivy-rich-candidate (:width 0.4))
|
||||||
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
||||||
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
||||||
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
||||||
(all-the-icons-ivy-rich-project-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
(all-the-icons-ivy-rich-project-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
||||||
:delimiter "\t")
|
:delimiter "\t")
|
||||||
|
|
||||||
|
magit-find-file
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-magit-file-icon)
|
||||||
|
(all-the-icons-ivy-rich-file-name (:width 0.4))
|
||||||
|
(all-the-icons-ivy-rich-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
||||||
|
(all-the-icons-ivy-rich-file-modes (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
||||||
|
(all-the-icons-ivy-rich-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
magit-find-file-other-frame
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-magit-file-icon)
|
||||||
|
(all-the-icons-ivy-rich-file-name (:width 0.4))
|
||||||
|
(all-the-icons-ivy-rich-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
||||||
|
(all-the-icons-ivy-rich-file-modes (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
||||||
|
(all-the-icons-ivy-rich-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
magit-find-file-other-window
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-magit-file-icon)
|
||||||
|
(all-the-icons-ivy-rich-file-name (:width 0.4))
|
||||||
|
(all-the-icons-ivy-rich-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
||||||
|
(all-the-icons-ivy-rich-file-modes (:width 12))
|
||||||
|
(all-the-icons-ivy-rich-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
||||||
|
(all-the-icons-ivy-rich-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
||||||
|
:delimiter "\t")
|
||||||
|
ivy-magit-todos
|
||||||
|
(:columns
|
||||||
|
((all-the-icons-ivy-rich-magit-todos-icon)
|
||||||
|
(all-the-icons-ivy-rich-magit-todos-transformer))
|
||||||
|
:delimiter "\t")
|
||||||
|
|
||||||
treemacs-projectile
|
treemacs-projectile
|
||||||
(:columns
|
(:columns
|
||||||
((all-the-icons-ivy-rich-project-icon)
|
((all-the-icons-ivy-rich-project-icon)
|
||||||
(all-the-icons-ivy-rich-project-name (:width 0.4))
|
(all-the-icons-ivy-rich-project-name))
|
||||||
(all-the-icons-ivy-rich-project-file-id (:width 15 :face all-the-icons-ivy-rich-file-owner-face :align right))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modes (:width 12))
|
|
||||||
(all-the-icons-ivy-rich-project-file-size (:width 7 :face all-the-icons-ivy-rich-size-face))
|
|
||||||
(all-the-icons-ivy-rich-project-file-modification-time (:face all-the-icons-ivy-rich-time-face)))
|
|
||||||
:delimiter "\t"))
|
:delimiter "\t"))
|
||||||
"Definitions for ivy-rich transformers.
|
"Definitions for ivy-rich transformers.
|
||||||
|
|
||||||
@@ -1033,7 +1141,7 @@ See `ivy-rich-display-transformers-list' for details."
|
|||||||
(format-mode-line (ivy-rich--local-values cand 'mode-name)))
|
(format-mode-line (ivy-rich--local-values cand 'mode-name)))
|
||||||
|
|
||||||
;; Support `kill-buffer'
|
;; Support `kill-buffer'
|
||||||
(defun all-the-icons-ivy-rich-kill-buffer (&optional buffer-or-name)
|
(defun all-the-icons-ivy-rich-kill-buffer (fn &optional buffer-or-name)
|
||||||
"Kill the buffer specified by BUFFER-OR-NAME."
|
"Kill the buffer specified by BUFFER-OR-NAME."
|
||||||
(interactive
|
(interactive
|
||||||
(list (completing-read (format "Kill buffer (default %s): " (buffer-name))
|
(list (completing-read (format "Kill buffer (default %s): " (buffer-name))
|
||||||
@@ -1042,7 +1150,7 @@ See `ivy-rich-display-transformers-list' for details."
|
|||||||
(buffer-list))
|
(buffer-list))
|
||||||
nil t nil nil
|
nil t nil nil
|
||||||
(buffer-name))))
|
(buffer-name))))
|
||||||
(kill-buffer buffer-or-name))
|
(funcall fn buffer-or-name))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich--project-root ()
|
(defun all-the-icons-ivy-rich--project-root ()
|
||||||
"Get the path to the root of your project.
|
"Get the path to the root of your project.
|
||||||
@@ -1059,9 +1167,10 @@ Return `default-directory' if no project was found."
|
|||||||
(projectile-project-root))
|
(projectile-project-root))
|
||||||
((fboundp 'project-current)
|
((fboundp 'project-current)
|
||||||
(when-let ((project (project-current)))
|
(when-let ((project (project-current)))
|
||||||
(expand-file-name (if (fboundp 'project-root)
|
(expand-file-name
|
||||||
|
(if (fboundp 'project-root)
|
||||||
(project-root project)
|
(project-root project)
|
||||||
(cdr project)))))
|
(car (with-no-warnings (project-roots project)))))))
|
||||||
(t default-directory))))
|
(t default-directory))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich--file-path (cand)
|
(defun all-the-icons-ivy-rich--file-path (cand)
|
||||||
@@ -1140,7 +1249,7 @@ Return `default-directory' if no project was found."
|
|||||||
((file-remote-p file) "")
|
((file-remote-p file) "")
|
||||||
((not (file-exists-p file)) "")
|
((not (file-exists-p file)) "")
|
||||||
(t (format-time-string
|
(t (format-time-string
|
||||||
"%b %d %H:%M"
|
"%b %d %R"
|
||||||
(file-attribute-modification-time (file-attributes file))))))
|
(file-attribute-modification-time (file-attributes file))))))
|
||||||
|
|
||||||
;; Support `counsel-find-file', `counsel-dired', etc.
|
;; Support `counsel-find-file', `counsel-dired', etc.
|
||||||
@@ -1183,8 +1292,8 @@ Display the true name when the file is a symlink."
|
|||||||
"Return project name for CAND."
|
"Return project name for CAND."
|
||||||
(if (or (ivy--dirname-p cand)
|
(if (or (ivy--dirname-p cand)
|
||||||
(file-directory-p (all-the-icons-ivy-rich--file-path cand)))
|
(file-directory-p (all-the-icons-ivy-rich--file-path cand)))
|
||||||
(propertize cand 'face 'ivy-subdir)
|
(propertize (abbreviate-file-name cand) 'face 'ivy-subdir)
|
||||||
cand))
|
(abbreviate-file-name cand)))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-project-file-modes (cand)
|
(defun all-the-icons-ivy-rich-project-file-modes (cand)
|
||||||
"Return file modes for CAND."
|
"Return file modes for CAND."
|
||||||
@@ -1469,12 +1578,19 @@ Only available in `emacs-lisp-mode'."
|
|||||||
(all-the-icons-ivy-rich-symbol-docstring sym))
|
(all-the-icons-ivy-rich-symbol-docstring sym))
|
||||||
""))
|
""))
|
||||||
|
|
||||||
;; Support `customize-group'
|
;; Support `customize-group' and `customize-group-other-window'
|
||||||
(defun all-the-icons-ivy-rich-custom-group-docstring (cand)
|
(defun all-the-icons-ivy-rich-custom-group-docstring (cand)
|
||||||
"Return custom group's documentation for CAND."
|
"Return custom group's documentation for CAND."
|
||||||
(all-the-icons-ivy-rich--truncate-docstring
|
(all-the-icons-ivy-rich--truncate-docstring
|
||||||
(or (documentation-property (intern cand) 'group-documentation) "")))
|
(or (documentation-property (intern cand) 'group-documentation) "")))
|
||||||
|
|
||||||
|
;; Support `customize-variable' and `customize-variable-other-window'
|
||||||
|
;; `customize-variable' ia an alias of `customize-option'
|
||||||
|
(defun all-the-icons-ivy-rich-custom-variable-docstring (cand)
|
||||||
|
"Return custom variable's documentation for CAND."
|
||||||
|
(all-the-icons-ivy-rich--truncate-docstring
|
||||||
|
(or (documentation-property (intern cand) 'variable-documentation) "")))
|
||||||
|
|
||||||
;; Support `describe-character-set'
|
;; Support `describe-character-set'
|
||||||
(defun all-the-icons-ivy-rich-charset-docstring (cand)
|
(defun all-the-icons-ivy-rich-charset-docstring (cand)
|
||||||
"Return charset's documentation for CAND."
|
"Return charset's documentation for CAND."
|
||||||
@@ -1575,7 +1691,7 @@ If the buffer is killed, return \"--\"."
|
|||||||
(if speed
|
(if speed
|
||||||
(format " at %s b/s" speed)
|
(format " at %s b/s" speed)
|
||||||
"")))))
|
"")))))
|
||||||
(mapconcat 'identity (process-command p) " "))))))
|
(mapconcat #'identity (process-command p) " "))))))
|
||||||
|
|
||||||
;; Support `counsel-find-library' and `counsel-load-library'
|
;; Support `counsel-find-library' and `counsel-load-library'
|
||||||
(defun all-the-icons-ivy-rich-library-transformer (cand)
|
(defun all-the-icons-ivy-rich-library-transformer (cand)
|
||||||
@@ -1584,11 +1700,6 @@ If the buffer is killed, return \"--\"."
|
|||||||
cand
|
cand
|
||||||
(propertize cand 'face 'all-the-icons-ivy-rich-off-face)))
|
(propertize cand 'face 'all-the-icons-ivy-rich-off-face)))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-library-path (cand)
|
|
||||||
"Return library path for CAND."
|
|
||||||
(abbreviate-file-name
|
|
||||||
(or (ignore-errors (find-library-name cand)) "")))
|
|
||||||
|
|
||||||
;; Support `counsel-world-clock'
|
;; Support `counsel-world-clock'
|
||||||
(defun all-the-icons-ivy-rich-world-clock (cand)
|
(defun all-the-icons-ivy-rich-world-clock (cand)
|
||||||
"Return local time of timezone (CAND)."
|
"Return local time of timezone (CAND)."
|
||||||
@@ -1616,6 +1727,15 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(propertize err 'face 'error))))
|
(propertize err 'face 'error))))
|
||||||
(t cand)))
|
(t cand)))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-magit-todos-transformer (cand)
|
||||||
|
"Transform `magit-todos' result (CAND)."
|
||||||
|
(let* ((strs (split-string cand " "))
|
||||||
|
(file (car strs))
|
||||||
|
(desc (cdr strs)))
|
||||||
|
(format "%s %s"
|
||||||
|
(propertize file 'face 'ivy-grep-info)
|
||||||
|
(string-join desc " "))))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Icons
|
;; Icons
|
||||||
;;
|
;;
|
||||||
@@ -1643,7 +1763,9 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(new-face `(:inherit ,face
|
(new-face `(:inherit ,face
|
||||||
:family ,family
|
:family ,family
|
||||||
:height ,all-the-icons-ivy-rich-icon-size)))
|
:height ,all-the-icons-ivy-rich-icon-size)))
|
||||||
(format " %s" (propertize icon 'face new-face))))
|
(format "%s%s"
|
||||||
|
(propertize " " 'display '((space :relative-width 0.1)))
|
||||||
|
(propertize icon 'face new-face))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-buffer-icon (cand)
|
(defun all-the-icons-ivy-rich-buffer-icon (cand)
|
||||||
"Display buffer icon for CAND in `ivy-rich'."
|
"Display buffer icon for CAND in `ivy-rich'."
|
||||||
@@ -1670,6 +1792,17 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(all-the-icons-faicon "file-o" :face 'all-the-icons-dsilver :height 0.9 :v-adjust 0.0)
|
(all-the-icons-faicon "file-o" :face 'all-the-icons-dsilver :height 0.9 :v-adjust 0.0)
|
||||||
(propertize icon 'display '(raise 0.0)))))))
|
(propertize icon 'display '(raise 0.0)))))))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-magit-file-icon (cand)
|
||||||
|
"Display file icon for CAND."
|
||||||
|
(if (string-suffix-p "Find file from revision: " ivy--prompt)
|
||||||
|
(all-the-icons-ivy-rich-git-branch-icon cand)
|
||||||
|
(all-the-icons-ivy-rich-file-icon cand)))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-magit-todos-icon (cand)
|
||||||
|
"Display file icon in `magit-todos'."
|
||||||
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
|
(all-the-icons-ivy-rich-file-icon (nth 0 (split-string cand " ")))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-dir-icon (_cand)
|
(defun all-the-icons-ivy-rich-dir-icon (_cand)
|
||||||
"Display project icon in `ivy-rich'."
|
"Display project icon in `ivy-rich'."
|
||||||
(when (all-the-icons-ivy-rich-icon-displayable)
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
@@ -1795,6 +1928,12 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(all-the-icons-ivy-rich--format-icon
|
(all-the-icons-ivy-rich--format-icon
|
||||||
(all-the-icons-octicon "git-branch" :height 1.0 :v-adjust -0.05 :face 'all-the-icons-green))))
|
(all-the-icons-octicon "git-branch" :height 1.0 :v-adjust -0.05 :face 'all-the-icons-green))))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-git-commit-icon (_cand)
|
||||||
|
"Display the git branch icon in `ivy-rich'."
|
||||||
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
|
(all-the-icons-ivy-rich--format-icon
|
||||||
|
(all-the-icons-octicon "git-commit" :height 1.0 :v-adjust -0.05 :face 'all-the-icons-green))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-process-icon (_cand)
|
(defun all-the-icons-ivy-rich-process-icon (_cand)
|
||||||
"Display the process icon in `ivy-rich'."
|
"Display the process icon in `ivy-rich'."
|
||||||
(when (all-the-icons-ivy-rich-icon-displayable)
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
@@ -1849,12 +1988,18 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(all-the-icons-octicon "file-directory" :height 0.9 :v-adjust 0.01))
|
(all-the-icons-octicon "file-directory" :height 0.9 :v-adjust 0.01))
|
||||||
(t (all-the-icons-icon-for-file (file-name-nondirectory file) :height 0.9 :v-adjust 0.0)))))))
|
(t (all-the-icons-icon-for-file (file-name-nondirectory file) :height 0.9 :v-adjust 0.0)))))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-settings-icon (_cand)
|
(defun all-the-icons-ivy-rich-group-settings-icon (_cand)
|
||||||
"Display settings icon for CAND in `ivy-rich'."
|
"Display group settings icon for CAND in `ivy-rich'."
|
||||||
(when (all-the-icons-ivy-rich-icon-displayable)
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
(all-the-icons-ivy-rich--format-icon
|
(all-the-icons-ivy-rich--format-icon
|
||||||
(all-the-icons-octicon "settings" :height 0.9 :v-adjust -0.01 :face 'all-the-icons-lblue))))
|
(all-the-icons-octicon "settings" :height 0.9 :v-adjust -0.01 :face 'all-the-icons-lblue))))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-variable-settings-icon (_cand)
|
||||||
|
"Display variable settings icon for CAND in `ivy-rich'."
|
||||||
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
|
(all-the-icons-ivy-rich--format-icon
|
||||||
|
(all-the-icons-octicon "settings" :height 0.9 :v-adjust -0.01 :face 'all-the-icons-lgreen))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-charset-icon (_cand)
|
(defun all-the-icons-ivy-rich-charset-icon (_cand)
|
||||||
"Display charset icon for CAND in `ivy-rich'."
|
"Display charset icon for CAND in `ivy-rich'."
|
||||||
(when (all-the-icons-ivy-rich-icon-displayable)
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
@@ -1888,9 +2033,11 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
|
|
||||||
(defun all-the-icons-ivy-rich-link-icon (cand)
|
(defun all-the-icons-ivy-rich-link-icon (cand)
|
||||||
"Display link icon in `ivy-rich'."
|
"Display link icon in `ivy-rich'."
|
||||||
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
|
(all-the-icons-ivy-rich--format-icon
|
||||||
(if (string-prefix-p "#" cand)
|
(if (string-prefix-p "#" cand)
|
||||||
(all-the-icons-faicon "anchor" :height 0.8 :v-adjust -0.05 :face 'all-the-icons-green)
|
(all-the-icons-faicon "anchor" :height 0.8 :v-adjust -0.05 :face 'all-the-icons-green)
|
||||||
(all-the-icons-material "link" :height 1.0 :v-adjust -0.2 :face 'all-the-icons-blue)))
|
(all-the-icons-material "link" :height 1.0 :v-adjust -0.2 :face 'all-the-icons-blue)))))
|
||||||
|
|
||||||
(defun all-the-icons-ivy-rich-key-icon (_cand)
|
(defun all-the-icons-ivy-rich-key-icon (_cand)
|
||||||
"Display key icon in `ivy-rich'."
|
"Display key icon in `ivy-rich'."
|
||||||
@@ -1898,6 +2045,12 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(all-the-icons-ivy-rich--format-icon
|
(all-the-icons-ivy-rich--format-icon
|
||||||
(all-the-icons-octicon "key" :height 0.8 :v-adjust -0.05))))
|
(all-the-icons-octicon "key" :height 0.8 :v-adjust -0.05))))
|
||||||
|
|
||||||
|
(defun all-the-icons-ivy-rich-lsp-icon (_cand)
|
||||||
|
"Display lsp icon in `ivy-rich'."
|
||||||
|
(when (all-the-icons-ivy-rich-icon-displayable)
|
||||||
|
(all-the-icons-ivy-rich--format-icon
|
||||||
|
(all-the-icons-faicon "rocket" :height 0.8 :v-adjust -0.05 :face 'all-the-icons-lgreen))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Modes
|
;; Modes
|
||||||
@@ -1914,12 +2067,12 @@ Support`counsel-ack', `counsel-ag', `counsel-pt' and `counsel-rg', etc."
|
|||||||
(progn
|
(progn
|
||||||
(add-hook 'minibuffer-setup-hook #'all-the-icons-ivy-rich-minibuffer-align-icons)
|
(add-hook 'minibuffer-setup-hook #'all-the-icons-ivy-rich-minibuffer-align-icons)
|
||||||
(advice-add #'ivy-posframe--display :after #'all-the-icons-ivy-rich-ivy-posframe-align-icons)
|
(advice-add #'ivy-posframe--display :after #'all-the-icons-ivy-rich-ivy-posframe-align-icons)
|
||||||
(global-set-key [remap kill-buffer] #'all-the-icons-ivy-rich-kill-buffer)
|
(advice-add #'kill-buffer :around #'all-the-icons-ivy-rich-kill-buffer)
|
||||||
(setq ivy-rich-display-transformers-list all-the-icons-ivy-rich-display-transformers-list))
|
(setq ivy-rich-display-transformers-list all-the-icons-ivy-rich-display-transformers-list))
|
||||||
(progn
|
(progn
|
||||||
(remove-hook 'minibuffer-setup-hook #'all-the-icons-ivy-rich-minibuffer-align-icons)
|
(remove-hook 'minibuffer-setup-hook #'all-the-icons-ivy-rich-minibuffer-align-icons)
|
||||||
(advice-remove #'ivy-posframe--display #'all-the-icons-ivy-rich-ivy-posframe-align-icons)
|
(advice-remove #'ivy-posframe--display #'all-the-icons-ivy-rich-ivy-posframe-align-icons)
|
||||||
(global-unset-key [remap kill-buffer])
|
(advice-remove #'kill-buffer #'all-the-icons-ivy-rich-kill-buffer)
|
||||||
(setq ivy-rich-display-transformers-list all-the-icons-ivy-rich-display-transformers-old-list)))
|
(setq ivy-rich-display-transformers-list all-the-icons-ivy-rich-display-transformers-old-list)))
|
||||||
(ivy-rich-reload))
|
(ivy-rich-reload))
|
||||||
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
(define-package "all-the-icons" "20220929.2303" "A library for inserting Developer icons"
|
(define-package "all-the-icons" "20230909.2053" "A library for inserting Developer icons"
|
||||||
'((emacs "24.3"))
|
'((emacs "24.3"))
|
||||||
:commit "51bf77da1ebc3c199dfc11f54c0dce67559f5f40" :authors
|
:commit "be9d5dcda9c892e8ca1535e288620eec075eb0be" :authors
|
||||||
|
'(("Dominic Charlesworth" . "dgc336@gmail.com"))
|
||||||
|
:maintainers
|
||||||
'(("Dominic Charlesworth" . "dgc336@gmail.com"))
|
'(("Dominic Charlesworth" . "dgc336@gmail.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Dominic Charlesworth" . "dgc336@gmail.com")
|
'("Dominic Charlesworth" . "dgc336@gmail.com")
|
||||||
|
|||||||
@@ -210,6 +210,8 @@
|
|||||||
("rd" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
("rd" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
||||||
("rdx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
("rdx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
||||||
("rsx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
("rsx" all-the-icons-fileicon "R" :face all-the-icons-lblue)
|
||||||
|
("beancount" all-the-icons-faicon "credit-card" :face all-the-icons-lgreen)
|
||||||
|
("ledger" all-the-icons-faicon "credit-card" :face all-the-icons-lgreen)
|
||||||
("svelte" all-the-icons-fileicon "svelte" :v-adjust 0.0 :face all-the-icons-red)
|
("svelte" all-the-icons-fileicon "svelte" :v-adjust 0.0 :face all-the-icons-red)
|
||||||
("gql" all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
("gql" all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
||||||
("graphql" all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
("graphql" all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
||||||
@@ -247,6 +249,7 @@
|
|||||||
("sass" all-the-icons-alltheicon "sass" :face all-the-icons-dpink)
|
("sass" all-the-icons-alltheicon "sass" :face all-the-icons-dpink)
|
||||||
("less" all-the-icons-alltheicon "less" :height 0.8 :face all-the-icons-dyellow)
|
("less" all-the-icons-alltheicon "less" :height 0.8 :face all-the-icons-dyellow)
|
||||||
("postcss" all-the-icons-fileicon "postcss" :face all-the-icons-dred)
|
("postcss" all-the-icons-fileicon "postcss" :face all-the-icons-dred)
|
||||||
|
("pcss" all-the-icons-fileicon "postcss" :face all-the-icons-dred)
|
||||||
("sss" all-the-icons-fileicon "postcss" :face all-the-icons-dred)
|
("sss" all-the-icons-fileicon "postcss" :face all-the-icons-dred)
|
||||||
("styl" all-the-icons-alltheicon "stylus" :face all-the-icons-lgreen)
|
("styl" all-the-icons-alltheicon "stylus" :face all-the-icons-lgreen)
|
||||||
("csv" all-the-icons-octicon "graph" :v-adjust 0.0 :face all-the-icons-dblue)
|
("csv" all-the-icons-octicon "graph" :v-adjust 0.0 :face all-the-icons-dblue)
|
||||||
@@ -277,11 +280,14 @@
|
|||||||
("react" all-the-icons-alltheicon "react" :height 1.1 :face all-the-icons-lblue)
|
("react" all-the-icons-alltheicon "react" :height 1.1 :face all-the-icons-lblue)
|
||||||
("ts" all-the-icons-fileicon "typescript" :height 1.0 :v-adjust -0.1 :face all-the-icons-blue-alt)
|
("ts" all-the-icons-fileicon "typescript" :height 1.0 :v-adjust -0.1 :face all-the-icons-blue-alt)
|
||||||
("js" all-the-icons-alltheicon "javascript" :height 1.0 :v-adjust 0.0 :face all-the-icons-yellow)
|
("js" all-the-icons-alltheicon "javascript" :height 1.0 :v-adjust 0.0 :face all-the-icons-yellow)
|
||||||
|
("mjs" all-the-icons-alltheicon "javascript" :height 1.0 :v-adjust 0.0 :face all-the-icons-yellow)
|
||||||
("es" all-the-icons-alltheicon "javascript" :height 1.0 :v-adjust 0.0 :face all-the-icons-yellow)
|
("es" all-the-icons-alltheicon "javascript" :height 1.0 :v-adjust 0.0 :face all-the-icons-yellow)
|
||||||
("jsx" all-the-icons-fileicon "jsx-2" :height 1.0 :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
("jsx" all-the-icons-fileicon "jsx-2" :height 1.0 :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
||||||
("tsx" all-the-icons-fileicon "tsx" :height 1.0 :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
("tsx" all-the-icons-fileicon "tsx" :height 1.0 :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
||||||
("njs" all-the-icons-alltheicon "nodejs" :height 1.2 :face all-the-icons-lgreen)
|
("njs" all-the-icons-alltheicon "nodejs" :height 1.2 :face all-the-icons-lgreen)
|
||||||
("vue" all-the-icons-fileicon "vue" :face all-the-icons-lgreen)
|
("vue" all-the-icons-fileicon "vue" :face all-the-icons-lgreen)
|
||||||
|
("wasm" all-the-icons-fileicon "wasm" :height 1.0 :face all-the-icons-purple-alt)
|
||||||
|
("wat" all-the-icons-fileicon "wasm" :height 1.0 :face all-the-icons-purple-alt)
|
||||||
|
|
||||||
("sbt" all-the-icons-fileicon "sbt" :face all-the-icons-red)
|
("sbt" all-the-icons-fileicon "sbt" :face all-the-icons-red)
|
||||||
("scala" all-the-icons-alltheicon "scala" :face all-the-icons-red)
|
("scala" all-the-icons-alltheicon "scala" :face all-the-icons-red)
|
||||||
@@ -386,6 +392,7 @@
|
|||||||
("ogv" all-the-icons-faicon "film" :face all-the-icons-dblue)
|
("ogv" all-the-icons-faicon "film" :face all-the-icons-dblue)
|
||||||
("mkv" all-the-icons-faicon "film" :face all-the-icons-blue)
|
("mkv" all-the-icons-faicon "film" :face all-the-icons-blue)
|
||||||
("webm" all-the-icons-faicon "film" :face all-the-icons-blue)
|
("webm" all-the-icons-faicon "film" :face all-the-icons-blue)
|
||||||
|
("dav" all-the-icons-faicon "film" :face all-the-icons-blue)
|
||||||
;; Fonts
|
;; Fonts
|
||||||
("ttf" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-dcyan)
|
("ttf" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-dcyan)
|
||||||
("woff" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-cyan)
|
("woff" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-cyan)
|
||||||
@@ -397,6 +404,8 @@
|
|||||||
("doc" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
("doc" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
||||||
("docx" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
("docx" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
||||||
("docm" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
("docm" all-the-icons-fileicon "word" :face all-the-icons-blue)
|
||||||
|
("eml" all-the-icons-faicon "envelope" :face all-the-icons-blue)
|
||||||
|
("msg" all-the-icons-faicon "envelope" :face all-the-icons-blue)
|
||||||
("texi" all-the-icons-fileicon "tex" :face all-the-icons-lred)
|
("texi" all-the-icons-fileicon "tex" :face all-the-icons-lred)
|
||||||
("tex" all-the-icons-fileicon "tex" :face all-the-icons-lred)
|
("tex" all-the-icons-fileicon "tex" :face all-the-icons-lred)
|
||||||
("md" all-the-icons-octicon "markdown" :v-adjust 0.0 :face all-the-icons-lblue)
|
("md" all-the-icons-octicon "markdown" :v-adjust 0.0 :face all-the-icons-lblue)
|
||||||
@@ -405,7 +414,7 @@
|
|||||||
("pps" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
("pps" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
||||||
("ppt" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
("ppt" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
||||||
("pptsx" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
("pptsx" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
||||||
("ppttx" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
("pptx" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange)
|
||||||
("knt" all-the-icons-fileicon "powerpoint" :face all-the-icons-cyan)
|
("knt" all-the-icons-fileicon "powerpoint" :face all-the-icons-cyan)
|
||||||
("xlsx" all-the-icons-fileicon "excel" :face all-the-icons-dgreen)
|
("xlsx" all-the-icons-fileicon "excel" :face all-the-icons-dgreen)
|
||||||
("xlsm" all-the-icons-fileicon "excel" :face all-the-icons-dgreen)
|
("xlsm" all-the-icons-fileicon "excel" :face all-the-icons-dgreen)
|
||||||
@@ -577,13 +586,17 @@ for performance sake.")
|
|||||||
(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0)
|
(erc-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0)
|
||||||
(inferior-emacs-lisp-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face all-the-icons-lblue)
|
(inferior-emacs-lisp-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face all-the-icons-lblue)
|
||||||
(dired-mode all-the-icons-octicon "file-directory" :v-adjust 0.0)
|
(dired-mode all-the-icons-octicon "file-directory" :v-adjust 0.0)
|
||||||
|
(wdired-mode all-the-icons-octicon "file-directory" :v-adjust 0.0 :face all-the-icons-dcyan)
|
||||||
(lisp-interaction-mode all-the-icons-fileicon "lisp" :v-adjust -0.1 :face all-the-icons-orange)
|
(lisp-interaction-mode all-the-icons-fileicon "lisp" :v-adjust -0.1 :face all-the-icons-orange)
|
||||||
(sly-mrepl-mode all-the-icons-fileicon "clisp" :v-adjust -0.1 :face all-the-icons-orange)
|
(sly-mrepl-mode all-the-icons-fileicon "clisp" :v-adjust -0.1 :face all-the-icons-orange)
|
||||||
(slime-repl-mode all-the-icons-fileicon "clisp" :v-adjust -0.1 :face all-the-icons-orange)
|
(slime-repl-mode all-the-icons-fileicon "clisp" :v-adjust -0.1 :face all-the-icons-orange)
|
||||||
(org-mode all-the-icons-fileicon "org" :v-adjust 0.0 :face all-the-icons-lgreen)
|
(org-mode all-the-icons-fileicon "org" :v-adjust 0.0 :face all-the-icons-lgreen)
|
||||||
(typescript-mode all-the-icons-fileicon "typescript" :v-adjust -0.1 :face all-the-icons-blue-alt)
|
(typescript-mode all-the-icons-fileicon "typescript" :v-adjust -0.1 :face all-the-icons-blue-alt)
|
||||||
|
(typescript-ts-mode all-the-icons-fileicon "typescript" :v-adjust -0.1 :face all-the-icons-blue-alt)
|
||||||
(typescript-tsx-mode all-the-icons-fileicon "tsx" :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
(typescript-tsx-mode all-the-icons-fileicon "tsx" :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
||||||
|
(tsx-ts-mode all-the-icons-fileicon "tsx" :v-adjust -0.1 :face all-the-icons-cyan-alt)
|
||||||
(js-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
(js-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
||||||
|
(js-ts-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
||||||
(js-jsx-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
(js-jsx-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
||||||
(js2-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
(js2-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
||||||
(js3-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
(js3-mode all-the-icons-alltheicon "javascript" :v-adjust -0.1 :face all-the-icons-yellow)
|
||||||
@@ -602,6 +615,7 @@ for performance sake.")
|
|||||||
(ibuffer-mode all-the-icons-faicon "files-o" :v-adjust 0.0 :face all-the-icons-dsilver)
|
(ibuffer-mode all-the-icons-faicon "files-o" :v-adjust 0.0 :face all-the-icons-dsilver)
|
||||||
(messages-buffer-mode all-the-icons-faicon "file-o" :v-adjust 0.0 :face all-the-icons-dsilver)
|
(messages-buffer-mode all-the-icons-faicon "file-o" :v-adjust 0.0 :face all-the-icons-dsilver)
|
||||||
(help-mode all-the-icons-faicon "info" :v-adjust -0.1 :face all-the-icons-purple)
|
(help-mode all-the-icons-faicon "info" :v-adjust -0.1 :face all-the-icons-purple)
|
||||||
|
(helpful-mode all-the-icons-faicon "info" :v-adjust -0.1 :face all-the-icons-purple)
|
||||||
(benchmark-init/tree-mode all-the-icons-octicon "dashboard" :v-adjust 0.0)
|
(benchmark-init/tree-mode all-the-icons-octicon "dashboard" :v-adjust 0.0)
|
||||||
(jenkins-mode all-the-icons-fileicon "jenkins" :face all-the-icons-blue)
|
(jenkins-mode all-the-icons-fileicon "jenkins" :face all-the-icons-blue)
|
||||||
(magit-popup-mode all-the-icons-alltheicon "git" :face all-the-icons-red)
|
(magit-popup-mode all-the-icons-alltheicon "git" :face all-the-icons-red)
|
||||||
@@ -612,6 +626,10 @@ for performance sake.")
|
|||||||
(mu4e-main-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
(mu4e-main-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
||||||
(mu4e-view-mode all-the-icons-octicon "mail-read" :v-adjust 0.0)
|
(mu4e-view-mode all-the-icons-octicon "mail-read" :v-adjust 0.0)
|
||||||
(sieve-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
(sieve-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
||||||
|
(gnus-group-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
||||||
|
(gnus-summary-mode all-the-icons-octicon "mail" :v-adjust 0.0)
|
||||||
|
(gnus-article-mode all-the-icons-octicon "mail-read" :v-adjust 0.0)
|
||||||
|
(message-mode all-the-icons-octicon "pencil" :v-adjust 0.0)
|
||||||
(package-menu-mode all-the-icons-faicon "archive" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver)
|
(package-menu-mode all-the-icons-faicon "archive" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver)
|
||||||
(paradox-menu-mode all-the-icons-faicon "archive" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver)
|
(paradox-menu-mode all-the-icons-faicon "archive" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver)
|
||||||
(Custom-mode all-the-icons-octicon "settings" :v-adjust -0.1)
|
(Custom-mode all-the-icons-octicon "settings" :v-adjust -0.1)
|
||||||
@@ -624,30 +642,39 @@ for performance sake.")
|
|||||||
(text-mode all-the-icons-octicon "file-text" :v-adjust 0.0 :face all-the-icons-cyan)
|
(text-mode all-the-icons-octicon "file-text" :v-adjust 0.0 :face all-the-icons-cyan)
|
||||||
(enh-ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-lred)
|
(enh-ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-lred)
|
||||||
(ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-lred)
|
(ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-lred)
|
||||||
|
(ruby-ts-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-lred)
|
||||||
(inf-ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
(inf-ruby-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
||||||
(projectile-rails-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
(projectile-rails-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
||||||
(rspec-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
(rspec-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
||||||
(rake-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
(rake-compilation-mode all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red)
|
||||||
(sh-mode all-the-icons-alltheicon "terminal" :face all-the-icons-purple)
|
(sh-mode all-the-icons-alltheicon "terminal" :face all-the-icons-purple)
|
||||||
|
(bash-ts-mode all-the-icons-alltheicon "terminal" :face all-the-icons-purple)
|
||||||
(shell-mode all-the-icons-alltheicon "terminal" :face all-the-icons-purple)
|
(shell-mode all-the-icons-alltheicon "terminal" :face all-the-icons-purple)
|
||||||
(fish-mode all-the-icons-alltheicon "terminal" :face all-the-icons-lpink)
|
(fish-mode all-the-icons-alltheicon "terminal" :face all-the-icons-lpink)
|
||||||
(nginx-mode all-the-icons-fileicon "nginx" :height 0.9 :face all-the-icons-dgreen)
|
(nginx-mode all-the-icons-fileicon "nginx" :height 0.9 :face all-the-icons-dgreen)
|
||||||
(apache-mode all-the-icons-alltheicon "apache" :height 0.9 :face all-the-icons-dgreen)
|
(apache-mode all-the-icons-alltheicon "apache" :height 0.9 :face all-the-icons-dgreen)
|
||||||
(makefile-mode all-the-icons-fileicon "gnu" :face all-the-icons-dorange)
|
(makefile-mode all-the-icons-fileicon "gnu" :face all-the-icons-dorange)
|
||||||
(cmake-mode all-the-icons-fileicon "cmake" :face all-the-icons-red)
|
(cmake-mode all-the-icons-fileicon "cmake" :face all-the-icons-red)
|
||||||
|
(cmake-ts-mode all-the-icons-fileicon "cmake" :face all-the-icons-red)
|
||||||
(dockerfile-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-blue)
|
(dockerfile-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-blue)
|
||||||
|
(dockerfile-ts-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-blue)
|
||||||
(docker-compose-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-lblue)
|
(docker-compose-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-lblue)
|
||||||
(nxml-mode all-the-icons-faicon "file-code-o" :height 0.95 :face all-the-icons-lorange)
|
(nxml-mode all-the-icons-faicon "file-code-o" :height 0.95 :face all-the-icons-lorange)
|
||||||
(json-mode all-the-icons-octicon "settings" :face all-the-icons-yellow)
|
(json-mode all-the-icons-octicon "settings" :face all-the-icons-yellow)
|
||||||
|
(json-ts-mode all-the-icons-octicon "settings" :face all-the-icons-yellow)
|
||||||
(jsonian-mode all-the-icons-octicon "settings" :face all-the-icons-yellow)
|
(jsonian-mode all-the-icons-octicon "settings" :face all-the-icons-yellow)
|
||||||
(yaml-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow)
|
(yaml-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow)
|
||||||
|
(yaml-ts-mode all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow)
|
||||||
(elisp-byte-code-mode all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-dsilver)
|
(elisp-byte-code-mode all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-dsilver)
|
||||||
(archive-mode all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon)
|
(archive-mode all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon)
|
||||||
(elm-mode all-the-icons-fileicon "elm" :face all-the-icons-blue)
|
(elm-mode all-the-icons-fileicon "elm" :face all-the-icons-blue)
|
||||||
(erlang-mode all-the-icons-alltheicon "erlang" :face all-the-icons-red :v-adjust -0.1 :height 0.9)
|
(erlang-mode all-the-icons-alltheicon "erlang" :face all-the-icons-red :v-adjust -0.1 :height 0.9)
|
||||||
(elixir-mode all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9)
|
(elixir-mode all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9)
|
||||||
(java-mode all-the-icons-alltheicon "java" :height 1.0 :face all-the-icons-purple)
|
(java-mode all-the-icons-alltheicon "java" :height 1.0 :face all-the-icons-purple)
|
||||||
|
(java-ts-mode all-the-icons-alltheicon "java" :height 1.0 :face all-the-icons-purple)
|
||||||
(go-mode all-the-icons-fileicon "go" :height 1.0 :face all-the-icons-blue)
|
(go-mode all-the-icons-fileicon "go" :height 1.0 :face all-the-icons-blue)
|
||||||
|
(go-ts-mode all-the-icons-fileicon "go" :height 1.0 :face all-the-icons-blue)
|
||||||
|
(go-mod-ts-mode all-the-icons-fileicon "config-go" :height 1.0 :face all-the-icons-blue-alt)
|
||||||
(go-dot-mod-mode all-the-icons-fileicon "config-go" :height 1.0 :face all-the-icons-blue-alt)
|
(go-dot-mod-mode all-the-icons-fileicon "config-go" :height 1.0 :face all-the-icons-blue-alt)
|
||||||
(go-dot-work-mode all-the-icons-fileicon "config-go" :height 1.0 :face all-the-icons-blue-alt)
|
(go-dot-work-mode all-the-icons-fileicon "config-go" :height 1.0 :face all-the-icons-blue-alt)
|
||||||
(graphql-mode all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
(graphql-mode all-the-icons-fileicon "graphql" :face all-the-icons-dpink)
|
||||||
@@ -658,22 +685,29 @@ for performance sake.")
|
|||||||
(php-mode all-the-icons-fileicon "php" :face all-the-icons-lsilver)
|
(php-mode all-the-icons-fileicon "php" :face all-the-icons-lsilver)
|
||||||
(prolog-mode all-the-icons-alltheicon "prolog" :height 1.1 :face all-the-icons-lmaroon)
|
(prolog-mode all-the-icons-alltheicon "prolog" :height 1.1 :face all-the-icons-lmaroon)
|
||||||
(python-mode all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue)
|
(python-mode all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue)
|
||||||
|
(python-ts-mode all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue)
|
||||||
(inferior-python-mode all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue)
|
(inferior-python-mode all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue)
|
||||||
(racket-mode all-the-icons-fileicon "racket" :height 1.2 :face all-the-icons-red)
|
(racket-mode all-the-icons-fileicon "racket" :height 1.2 :face all-the-icons-red)
|
||||||
(rust-mode all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon)
|
(rust-mode all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon)
|
||||||
|
(rustic-mode all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon)
|
||||||
|
(rust-ts-mode all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon)
|
||||||
(scala-mode all-the-icons-alltheicon "scala" :face all-the-icons-red)
|
(scala-mode all-the-icons-alltheicon "scala" :face all-the-icons-red)
|
||||||
(scheme-mode all-the-icons-fileicon "scheme" :height 1.2 :face all-the-icons-red)
|
(scheme-mode all-the-icons-fileicon "scheme" :height 1.2 :face all-the-icons-red)
|
||||||
(swift-mode all-the-icons-alltheicon "swift" :height 1.0 :v-adjust -0.1 :face all-the-icons-green)
|
(swift-mode all-the-icons-alltheicon "swift" :height 1.0 :v-adjust -0.1 :face all-the-icons-green)
|
||||||
(svelte-mode all-the-icons-fileicon "svelte" :v-adjust 0.0 :face all-the-icons-red)
|
(svelte-mode all-the-icons-fileicon "svelte" :v-adjust 0.0 :face all-the-icons-red)
|
||||||
(c-mode all-the-icons-alltheicon "c-line" :face all-the-icons-blue)
|
(c-mode all-the-icons-alltheicon "c-line" :face all-the-icons-blue)
|
||||||
|
(c-ts-mode all-the-icons-alltheicon "c-line" :face all-the-icons-blue)
|
||||||
(c++-mode all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue)
|
(c++-mode all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue)
|
||||||
|
(c++-ts-mode all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue)
|
||||||
(csharp-mode all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue)
|
(csharp-mode all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue)
|
||||||
|
(csharp-ts-mode all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue)
|
||||||
(clojure-mode all-the-icons-alltheicon "clojure" :height 1.0 :face all-the-icons-blue)
|
(clojure-mode all-the-icons-alltheicon "clojure" :height 1.0 :face all-the-icons-blue)
|
||||||
(cider-repl-mode all-the-icons-alltheicon "clojure" :height 1.0 :face all-the-icons-green)
|
(cider-repl-mode all-the-icons-alltheicon "clojure" :height 1.0 :face all-the-icons-green)
|
||||||
(clojurescript-mode all-the-icons-fileicon "cljs" :height 1.0 :face all-the-icons-dblue)
|
(clojurescript-mode all-the-icons-fileicon "cljs" :height 1.0 :face all-the-icons-dblue)
|
||||||
(coffee-mode all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-maroon)
|
(coffee-mode all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-maroon)
|
||||||
(lisp-mode all-the-icons-fileicon "lisp" :face all-the-icons-orange)
|
(lisp-mode all-the-icons-fileicon "lisp" :face all-the-icons-orange)
|
||||||
(css-mode all-the-icons-alltheicon "css3" :face all-the-icons-yellow)
|
(css-mode all-the-icons-alltheicon "css3" :face all-the-icons-yellow)
|
||||||
|
(css-ts-mode all-the-icons-alltheicon "css3" :face all-the-icons-yellow)
|
||||||
(scss-mode all-the-icons-alltheicon "sass" :face all-the-icons-pink)
|
(scss-mode all-the-icons-alltheicon "sass" :face all-the-icons-pink)
|
||||||
(sass-mode all-the-icons-alltheicon "sass" :face all-the-icons-dpink)
|
(sass-mode all-the-icons-alltheicon "sass" :face all-the-icons-dpink)
|
||||||
(less-css-mode all-the-icons-alltheicon "less" :height 0.8 :face all-the-icons-dyellow)
|
(less-css-mode all-the-icons-alltheicon "less" :height 0.8 :face all-the-icons-dyellow)
|
||||||
@@ -684,6 +718,7 @@ for performance sake.")
|
|||||||
(literate-haskell-mode all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red)
|
(literate-haskell-mode all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red)
|
||||||
(haml-mode all-the-icons-fileicon "haml" :face all-the-icons-lyellow)
|
(haml-mode all-the-icons-fileicon "haml" :face all-the-icons-lyellow)
|
||||||
(html-mode all-the-icons-alltheicon "html5" :face all-the-icons-orange)
|
(html-mode all-the-icons-alltheicon "html5" :face all-the-icons-orange)
|
||||||
|
(html-ts-mode all-the-icons-alltheicon "html5" :face all-the-icons-orange)
|
||||||
(rhtml-mode all-the-icons-alltheicon "html5" :face all-the-icons-lred)
|
(rhtml-mode all-the-icons-alltheicon "html5" :face all-the-icons-lred)
|
||||||
(mustache-mode all-the-icons-fileicon "moustache" :face all-the-icons-green)
|
(mustache-mode all-the-icons-fileicon "moustache" :face all-the-icons-green)
|
||||||
(slim-mode all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow)
|
(slim-mode all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow)
|
||||||
@@ -703,6 +738,7 @@ for performance sake.")
|
|||||||
(vhdl-mode all-the-icons-fileicon "vhdl" :face all-the-icons-blue)
|
(vhdl-mode all-the-icons-fileicon "vhdl" :face all-the-icons-blue)
|
||||||
(haskell-cabal-mode all-the-icons-fileicon "cabal" :face all-the-icons-lblue)
|
(haskell-cabal-mode all-the-icons-fileicon "cabal" :face all-the-icons-lblue)
|
||||||
(kotlin-mode all-the-icons-fileicon "kotlin" :face all-the-icons-orange)
|
(kotlin-mode all-the-icons-fileicon "kotlin" :face all-the-icons-orange)
|
||||||
|
(kotlin-ts-mode all-the-icons-fileicon "kotlin" :face all-the-icons-orange)
|
||||||
(nim-mode all-the-icons-fileicon "nimrod" :face all-the-icons-yellow)
|
(nim-mode all-the-icons-fileicon "nimrod" :face all-the-icons-yellow)
|
||||||
(sql-mode all-the-icons-octicon "database" :face all-the-icons-silver)
|
(sql-mode all-the-icons-octicon "database" :face all-the-icons-silver)
|
||||||
(lua-mode all-the-icons-fileicon "lua" :face all-the-icons-dblue)
|
(lua-mode all-the-icons-fileicon "lua" :face all-the-icons-dblue)
|
||||||
@@ -722,15 +758,26 @@ for performance sake.")
|
|||||||
(hy-mode all-the-icons-fileicon "hy" :face all-the-icons-blue)
|
(hy-mode all-the-icons-fileicon "hy" :face all-the-icons-blue)
|
||||||
(glsl-mode all-the-icons-fileicon "vertex-shader" :face all-the-icons-green)
|
(glsl-mode all-the-icons-fileicon "vertex-shader" :face all-the-icons-green)
|
||||||
(zig-mode all-the-icons-fileicon "zig" :face all-the-icons-orange)
|
(zig-mode all-the-icons-fileicon "zig" :face all-the-icons-orange)
|
||||||
|
(exwm-mode all-the-icons-octicon "browser" :v-adjust 0.2 :face all-the-icons-purple)
|
||||||
|
(beancount-mode all-the-icons-faicon "credit-card" :face all-the-icons-lgreen)
|
||||||
|
(ledger-mode all-the-icons-faicon "credit-card" :face all-the-icons-lgreen)
|
||||||
(odin-mode all-the-icons-fileicon "odin" :height 1.1 :face all-the-icons-lblue)
|
(odin-mode all-the-icons-fileicon "odin" :height 1.1 :face all-the-icons-lblue)
|
||||||
(pdf-view-mode all-the-icons-octicon "file-pdf" :v-adjust 0.0 :face all-the-icons-dred)
|
(pdf-view-mode all-the-icons-octicon "file-pdf" :v-adjust 0.0 :face all-the-icons-dred)
|
||||||
|
(spacemacs-buffer-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face all-the-icons-purple)
|
||||||
(elfeed-search-mode all-the-icons-faicon "rss-square" :face all-the-icons-orange)
|
(elfeed-search-mode all-the-icons-faicon "rss-square" :face all-the-icons-orange)
|
||||||
(elfeed-show-mode all-the-icons-faicon "rss" :face all-the-icons-orange)
|
(elfeed-show-mode all-the-icons-faicon "rss" :face all-the-icons-orange)
|
||||||
|
(emms-browser-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
|
(emms-lyrics-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
|
(emms-show-all-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
|
(emms-metaplaylist-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
|
(emms-tag-editor-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
|
(emms-playlist-mode all-the-icons-faicon "music" :face all-the-icons-silver)
|
||||||
(lilypond-mode all-the-icons-faicon "music" :face all-the-icons-green)
|
(lilypond-mode all-the-icons-faicon "music" :face all-the-icons-green)
|
||||||
(magik-session-mode all-the-icons-alltheicon "terminal" :face all-the-icons-blue)
|
(magik-session-mode all-the-icons-alltheicon "terminal" :face all-the-icons-blue)
|
||||||
(magik-cb-mode all-the-icons-faicon "book" :face all-the-icons-blue)
|
(magik-cb-mode all-the-icons-faicon "book" :face all-the-icons-blue)
|
||||||
(meson-mode all-the-icons-fileicon "meson" :face all-the-icons-purple)
|
(meson-mode all-the-icons-fileicon "meson" :face all-the-icons-purple)
|
||||||
(man-common all-the-icons-fileicon "man-page" :face all-the-icons-blue)))
|
(man-common all-the-icons-fileicon "man-page" :face all-the-icons-blue)
|
||||||
|
(ess-r-mode all-the-icons-fileicon "R" :face all-the-icons-lblue)))
|
||||||
|
|
||||||
(defvar all-the-icons-url-alist
|
(defvar all-the-icons-url-alist
|
||||||
'(
|
'(
|
||||||
@@ -843,8 +890,8 @@ for performance sake.")
|
|||||||
(eq major-mode auto-mode)))
|
(eq major-mode auto-mode)))
|
||||||
|
|
||||||
(defun all-the-icons-match-to-alist (file alist)
|
(defun all-the-icons-match-to-alist (file alist)
|
||||||
"Match FILE against an entry in ALIST using `string-match'."
|
"Match FILE against an entry in ALIST using `string-match-p'."
|
||||||
(cdr (cl-find-if (lambda (it) (string-match (car it) file)) alist)))
|
(cdr (cl-find-if (lambda (it) (string-match-p (car it) file)) alist)))
|
||||||
|
|
||||||
(defun all-the-icons-dir-is-submodule (dir)
|
(defun all-the-icons-dir-is-submodule (dir)
|
||||||
"Checker whether or not DIR is a git submodule."
|
"Checker whether or not DIR is a git submodule."
|
||||||
@@ -916,20 +963,21 @@ inserting functions.
|
|||||||
|
|
||||||
Note: You want chevron, please use `all-the-icons-icon-for-dir-with-chevron'."
|
Note: You want chevron, please use `all-the-icons-icon-for-dir-with-chevron'."
|
||||||
(let* ((dirname (file-name-base (directory-file-name dir)))
|
(let* ((dirname (file-name-base (directory-file-name dir)))
|
||||||
(path (expand-file-name dir))
|
|
||||||
(icon (all-the-icons-match-to-alist dirname all-the-icons-dir-icon-alist))
|
(icon (all-the-icons-match-to-alist dirname all-the-icons-dir-icon-alist))
|
||||||
(args (cdr icon)))
|
(args (cdr icon)))
|
||||||
(when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args))))
|
(when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args))))
|
||||||
|
(if (file-remote-p dir) ;; don't call expand-file-name on a remote dir as this can make emacs hang
|
||||||
|
(apply #'all-the-icons-octicon "terminal" (cdr args))
|
||||||
|
(let
|
||||||
|
((path (expand-file-name dir)))
|
||||||
(cond
|
(cond
|
||||||
((file-remote-p path)
|
|
||||||
(apply #'all-the-icons-octicon "terminal" (cdr args)))
|
|
||||||
((file-symlink-p path)
|
((file-symlink-p path)
|
||||||
(apply #'all-the-icons-octicon "file-symlink-directory" (cdr args)))
|
(apply #'all-the-icons-octicon "file-symlink-directory" (cdr args)))
|
||||||
((all-the-icons-dir-is-submodule path)
|
((all-the-icons-dir-is-submodule path)
|
||||||
(apply #'all-the-icons-octicon "file-submodule" (cdr args)))
|
(apply #'all-the-icons-octicon "file-submodule" (cdr args)))
|
||||||
((file-exists-p (format "%s/.git" path))
|
((file-exists-p (format "%s/.git" path))
|
||||||
(apply #'all-the-icons-octicon "repo" (cdr args)))
|
(apply #'all-the-icons-octicon "repo" (cdr args)))
|
||||||
(t (apply (car icon) args)))))
|
(t (apply (car icon) args)))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun all-the-icons-icon-for-file (file &rest arg-overrides)
|
(defun all-the-icons-icon-for-file (file &rest arg-overrides)
|
||||||
@@ -1164,7 +1212,7 @@ pause for DURATION seconds between printing each character."
|
|||||||
(mapc
|
(mapc
|
||||||
(lambda (it)
|
(lambda (it)
|
||||||
(insert (format "%s - %s\n" (funcall insert-f (car it) :height height) (car it)))
|
(insert (format "%s - %s\n" (funcall insert-f (car it) :height height) (car it)))
|
||||||
(when duration (sit-for duration 0)))
|
(when duration (sit-for duration)))
|
||||||
data)))
|
data)))
|
||||||
|
|
||||||
(defmacro all-the-icons-define-icon (name alist family &optional font-name)
|
(defmacro all-the-icons-define-icon (name alist family &optional font-name)
|
||||||
@@ -1219,8 +1267,6 @@ FONT-NAME is the name of the .ttf file providing the font, defaults to FAMILY."
|
|||||||
(interactive "P")
|
(interactive "P")
|
||||||
(all-the-icons-insert arg (quote ,name)))))
|
(all-the-icons-insert arg (quote ,name)))))
|
||||||
|
|
||||||
(define-obsolete-function-alias 'define-icon 'all-the-icons-define-icon "4.0.0")
|
|
||||||
|
|
||||||
(all-the-icons-define-icon alltheicon all-the-icons-data/alltheicons-alist "all-the-icons")
|
(all-the-icons-define-icon alltheicon all-the-icons-data/alltheicons-alist "all-the-icons")
|
||||||
(all-the-icons-define-icon fileicon all-the-icons-data/file-icon-alist "file-icons")
|
(all-the-icons-define-icon fileicon all-the-icons-data/file-icon-alist "file-icons")
|
||||||
(all-the-icons-define-icon faicon all-the-icons-data/fa-icon-alist "FontAwesome")
|
(all-the-icons-define-icon faicon all-the-icons-data/fa-icon-alist "FontAwesome")
|
||||||
|
|||||||
16
lisp/amx/amx-pkg.el
Normal file
16
lisp/amx/amx-pkg.el
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
(define-package "amx" "20230413.1210" "Alternative M-x with extra features."
|
||||||
|
'((emacs "24.4")
|
||||||
|
(s "0"))
|
||||||
|
:commit "1c2428d21e9d2ee8bee944b572a39ca8c91ca13b" :authors
|
||||||
|
'(("Ryan C. Thompson" . "rct@thompsonclan.org")
|
||||||
|
("Cornelius Mika" . "cornelius.mika@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Ryan C. Thompson" . "rct@thompsonclan.org"))
|
||||||
|
:maintainer
|
||||||
|
'("Ryan C. Thompson" . "rct@thompsonclan.org")
|
||||||
|
:keywords
|
||||||
|
'("convenience" "usability" "completion")
|
||||||
|
:url "http://github.com/DarwinAwardWinner/amx/")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -8,8 +8,6 @@
|
|||||||
;; Cornelius Mika <cornelius.mika@gmail.com>
|
;; Cornelius Mika <cornelius.mika@gmail.com>
|
||||||
;; Maintainer: Ryan C. Thompson <rct@thompsonclan.org>
|
;; Maintainer: Ryan C. Thompson <rct@thompsonclan.org>
|
||||||
;; URL: http://github.com/DarwinAwardWinner/amx/
|
;; URL: http://github.com/DarwinAwardWinner/amx/
|
||||||
;; Package-Version: 20210305.118
|
|
||||||
;; Package-Commit: 37f9c7ae55eb0331b27200fb745206fc58ceffc0
|
|
||||||
;; Package-Requires: ((emacs "24.4") (s "0"))
|
;; Package-Requires: ((emacs "24.4") (s "0"))
|
||||||
;; Version: 3.4
|
;; Version: 3.4
|
||||||
;; Keywords: convenience, usability, completion
|
;; Keywords: convenience, usability, completion
|
||||||
@@ -238,6 +236,7 @@ nil) if you don't find it useful."
|
|||||||
"\\`self-insert-and-exit\\'"
|
"\\`self-insert-and-exit\\'"
|
||||||
"\\`ad-Orig-"
|
"\\`ad-Orig-"
|
||||||
"\\`menu-bar"
|
"\\`menu-bar"
|
||||||
|
"\\`kill-emacs\\'"
|
||||||
amx-command-marked-ignored-p
|
amx-command-marked-ignored-p
|
||||||
amx-command-obsolete-p
|
amx-command-obsolete-p
|
||||||
amx-command-mouse-interactive-p)
|
amx-command-mouse-interactive-p)
|
||||||
@@ -622,7 +621,7 @@ May not work for things like ido and ivy."
|
|||||||
|
|
||||||
(cl-defun amx-completing-read-helm (choices &key initial-input predicate def)
|
(cl-defun amx-completing-read-helm (choices &key initial-input predicate def)
|
||||||
"Amx backend for helm completion."
|
"Amx backend for helm completion."
|
||||||
(require 'helm-config)
|
(require 'helm)
|
||||||
(require 'helm-mode) ; Provides `helm-comp-read-map'
|
(require 'helm-mode) ; Provides `helm-comp-read-map'
|
||||||
(helm-comp-read (amx-prompt-with-prefix-arg) choices
|
(helm-comp-read (amx-prompt-with-prefix-arg) choices
|
||||||
:initial-input initial-input
|
:initial-input initial-input
|
||||||
@@ -630,7 +629,7 @@ May not work for things like ido and ivy."
|
|||||||
:default def
|
:default def
|
||||||
:name "Helm M-x Completions"
|
:name "Helm M-x Completions"
|
||||||
:buffer "Helm M-x Completions"
|
:buffer "Helm M-x Completions"
|
||||||
:history extended-command-history
|
:history 'extended-command-history
|
||||||
:reverse-history t
|
:reverse-history t
|
||||||
:must-match t
|
:must-match t
|
||||||
:fuzzy (or (bound-and-true-p helm-mode-fuzzy-match)
|
:fuzzy (or (bound-and-true-p helm-mode-fuzzy-match)
|
||||||
@@ -675,7 +674,8 @@ May not work for things like ido and ivy."
|
|||||||
:auto-activate '(bound-and-true-p selectrum-mode))
|
:auto-activate '(bound-and-true-p selectrum-mode))
|
||||||
|
|
||||||
(defsubst amx-auto-select-backend ()
|
(defsubst amx-auto-select-backend ()
|
||||||
(cl-loop for (bname b) on amx-known-backends by 'cddr
|
(cl-loop
|
||||||
|
for (bname b) on amx-known-backends by 'cddr
|
||||||
;; Don't auto-select the auto backend, or the
|
;; Don't auto-select the auto backend, or the
|
||||||
;; default backend.
|
;; default backend.
|
||||||
unless (memq bname '(auto standard))
|
unless (memq bname '(auto standard))
|
||||||
@@ -771,10 +771,10 @@ This should be the name of backend defined using
|
|||||||
;; This speeds up sorting.
|
;; This speeds up sorting.
|
||||||
(let (new-commands)
|
(let (new-commands)
|
||||||
(mapatoms (lambda (symbol)
|
(mapatoms (lambda (symbol)
|
||||||
(when (commandp symbol)
|
|
||||||
(let ((known-command (assq symbol amx-data)))
|
(let ((known-command (assq symbol amx-data)))
|
||||||
(if known-command
|
(if known-command
|
||||||
(setq amx-cache (cons known-command amx-cache))
|
(setq amx-cache (cons known-command amx-cache))
|
||||||
|
(when (commandp symbol)
|
||||||
(setq new-commands (cons (list symbol) new-commands)))))))
|
(setq new-commands (cons (list symbol) new-commands)))))))
|
||||||
(if (eq (length amx-cache) 0)
|
(if (eq (length amx-cache) 0)
|
||||||
(setq amx-cache new-commands)
|
(setq amx-cache new-commands)
|
||||||
@@ -848,8 +848,8 @@ has changed."
|
|||||||
This function is normally idempotent, only having an effect the
|
This function is normally idempotent, only having an effect the
|
||||||
first time it is called, so it is safe to call it at the
|
first time it is called, so it is safe to call it at the
|
||||||
beginning of any function that expects amx to be initialized.
|
beginning of any function that expects amx to be initialized.
|
||||||
However, optional arg REINIT forces the initialization needs to
|
However, optional arg REINIT forces the initialization to be
|
||||||
be re-run. Interactively, reinitialize when a prefix arg is
|
re-run. Interactively, reinitialize when a prefix arg is
|
||||||
provided."
|
provided."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(when (or reinit (not amx-initialized))
|
(when (or reinit (not amx-initialized))
|
||||||
@@ -1,13 +1,17 @@
|
|||||||
(define-package "anaconda-mode" "20220922.741" "Code navigation, documentation lookup and completion for Python"
|
(define-package "anaconda-mode" "20230821.2131" "Code navigation, documentation lookup and completion for Python"
|
||||||
'((emacs "25.1")
|
'((emacs "25.1")
|
||||||
(pythonic "0.1.0")
|
(pythonic "0.1.0")
|
||||||
(dash "2.6.0")
|
(dash "2.6.0")
|
||||||
(s "1.9")
|
(s "1.9")
|
||||||
(f "0.16.2"))
|
(f "0.16.2"))
|
||||||
:commit "ca8edbaa7662d97e4a4416ec9a8d743863303911" :authors
|
:commit "9dbd65b034cef519c01f63703399ae59651f85ca" :authors
|
||||||
|
'(("Artem Malyshev" . "proofit404@gmail.com"))
|
||||||
|
:maintainers
|
||||||
'(("Artem Malyshev" . "proofit404@gmail.com"))
|
'(("Artem Malyshev" . "proofit404@gmail.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Artem Malyshev" . "proofit404@gmail.com")
|
'("Artem Malyshev" . "proofit404@gmail.com")
|
||||||
|
:keywords
|
||||||
|
'("convenience" "anaconda")
|
||||||
:url "https://github.com/proofit404/anaconda-mode")
|
:url "https://github.com/proofit404/anaconda-mode")
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; no-byte-compile: t
|
;; no-byte-compile: t
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
;; URL: https://github.com/proofit404/anaconda-mode
|
;; URL: https://github.com/proofit404/anaconda-mode
|
||||||
;; Version: 0.1.15
|
;; Version: 0.1.15
|
||||||
;; Package-Requires: ((emacs "25.1") (pythonic "0.1.0") (dash "2.6.0") (s "1.9") (f "0.16.2"))
|
;; Package-Requires: ((emacs "25.1") (pythonic "0.1.0") (dash "2.6.0") (s "1.9") (f "0.16.2"))
|
||||||
|
;; Keywords: convenience anaconda
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
|
|
||||||
(require 'ansi-color)
|
(require 'ansi-color)
|
||||||
(require 'pythonic)
|
(require 'pythonic)
|
||||||
|
(require 'cl-lib)
|
||||||
(require 'tramp)
|
(require 'tramp)
|
||||||
(require 'xref)
|
(require 'xref)
|
||||||
(require 'json)
|
(require 'json)
|
||||||
@@ -77,6 +79,13 @@
|
|||||||
"Time in seconds `anaconda-mode' waits for a synchronous response."
|
"Time in seconds `anaconda-mode' waits for a synchronous response."
|
||||||
:type 'integer)
|
:type 'integer)
|
||||||
|
|
||||||
|
; create a defcustom that only allows for 'never, 'always, or 'remote
|
||||||
|
(defcustom anaconda-mode-disable-rpc 'never
|
||||||
|
"Disable RPC calls to the `anaconda-mode' server when remote."
|
||||||
|
:type '(choice (const :tag "Never" never)
|
||||||
|
(const :tag "Always" always)
|
||||||
|
(const :tag "Remote" remote)))
|
||||||
|
|
||||||
;;; Compatibility
|
;;; Compatibility
|
||||||
|
|
||||||
;; Functions from posframe which is an optional dependency
|
;; Functions from posframe which is an optional dependency
|
||||||
@@ -361,8 +370,11 @@ called when `anaconda-mode-port' will be bound."
|
|||||||
(defun anaconda-mode-call (command callback)
|
(defun anaconda-mode-call (command callback)
|
||||||
"Make remote procedure call for COMMAND.
|
"Make remote procedure call for COMMAND.
|
||||||
Apply CALLBACK to the result asynchronously."
|
Apply CALLBACK to the result asynchronously."
|
||||||
|
(unless (or (eq anaconda-mode-disable-rpc 'always)
|
||||||
|
(and (eq anaconda-mode-disable-rpc 'remote)
|
||||||
|
(pythonic-remote-p)))
|
||||||
(anaconda-mode-start
|
(anaconda-mode-start
|
||||||
(lambda () (anaconda-mode-jsonrpc command callback))))
|
(lambda () (anaconda-mode-jsonrpc command callback)))))
|
||||||
|
|
||||||
(defun anaconda-mode-call-sync (command callback)
|
(defun anaconda-mode-call-sync (command callback)
|
||||||
"Make remote procedure call for COMMAND.
|
"Make remote procedure call for COMMAND.
|
||||||
@@ -699,26 +711,29 @@ Show ERROR-MESSAGE if result is empty."
|
|||||||
|
|
||||||
;;; Eldoc.
|
;;; Eldoc.
|
||||||
|
|
||||||
(defun anaconda-mode-eldoc-function ()
|
(defun anaconda-mode-eldoc-function (callback &rest _ignored)
|
||||||
"Show eldoc for context at point."
|
"Show eldoc for context at point."
|
||||||
(anaconda-mode-call "eldoc" 'anaconda-mode-eldoc-callback)
|
(anaconda-mode-call
|
||||||
|
"eldoc"
|
||||||
|
(lambda (x)
|
||||||
|
(funcall callback (anaconda-mode-eldoc-format x))))
|
||||||
;; Don't show response buffer name as ElDoc message.
|
;; Don't show response buffer name as ElDoc message.
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(defun anaconda-mode-eldoc-callback (result)
|
|
||||||
"Display eldoc from server RESULT."
|
|
||||||
(eldoc-message (anaconda-mode-eldoc-format result)))
|
|
||||||
|
|
||||||
(defun anaconda-mode-eldoc-format (result)
|
(defun anaconda-mode-eldoc-format (result)
|
||||||
"Format eldoc string from RESULT."
|
"Format eldoc string from RESULT."
|
||||||
(when result
|
(when result
|
||||||
(let ((doc (anaconda-mode-eldoc-format-definition
|
(let ((doc (cl-map 'list
|
||||||
(aref result 0)
|
(lambda (s)
|
||||||
(aref result 1)
|
(anaconda-mode-eldoc-format-definition
|
||||||
(aref result 2))))
|
(aref s 0)
|
||||||
|
(aref s 1)
|
||||||
|
(aref s 2)))
|
||||||
|
result)))
|
||||||
(if anaconda-mode-eldoc-as-single-line
|
(if anaconda-mode-eldoc-as-single-line
|
||||||
(substring doc 0 (min (frame-width) (length doc)))
|
(let ((d (mapconcat #'identity doc ", ")))
|
||||||
doc))))
|
(substring d 0 (min (frame-width) (length d))))
|
||||||
|
(mapconcat #'identity doc "\n")))))
|
||||||
|
|
||||||
(defun anaconda-mode-eldoc-format-definition (name index params)
|
(defun anaconda-mode-eldoc-format-definition (name index params)
|
||||||
"Format function definition from NAME, INDEX and PARAMS."
|
"Format function definition from NAME, INDEX and PARAMS."
|
||||||
@@ -768,13 +783,14 @@ Show ERROR-MESSAGE if result is empty."
|
|||||||
|
|
||||||
(defun turn-on-anaconda-eldoc-mode ()
|
(defun turn-on-anaconda-eldoc-mode ()
|
||||||
"Turn on `anaconda-eldoc-mode'."
|
"Turn on `anaconda-eldoc-mode'."
|
||||||
(make-local-variable 'eldoc-documentation-function)
|
(add-hook 'eldoc-documentation-functions
|
||||||
(setq-local eldoc-documentation-function 'anaconda-mode-eldoc-function)
|
'anaconda-mode-eldoc-function nil 't)
|
||||||
(eldoc-mode +1))
|
(eldoc-mode +1))
|
||||||
|
|
||||||
(defun turn-off-anaconda-eldoc-mode ()
|
(defun turn-off-anaconda-eldoc-mode ()
|
||||||
"Turn off `anaconda-eldoc-mode'."
|
"Turn off `anaconda-eldoc-mode'."
|
||||||
(kill-local-variable 'eldoc-documentation-function)
|
(remove-hook 'eldoc-documentation-functions
|
||||||
|
'anaconda-mode-eldoc-function 't)
|
||||||
(eldoc-mode -1))
|
(eldoc-mode -1))
|
||||||
|
|
||||||
(provide 'anaconda-mode)
|
(provide 'anaconda-mode)
|
||||||
|
|||||||
@@ -192,11 +192,11 @@ def get_references(script, line, column):
|
|||||||
@script_method
|
@script_method
|
||||||
def eldoc(script, line, column):
|
def eldoc(script, line, column):
|
||||||
signatures = script.get_signatures(line, column)
|
signatures = script.get_signatures(line, column)
|
||||||
if len(signatures) == 1:
|
if len(signatures) >= 1:
|
||||||
signature = signatures[0]
|
return [(s.name,
|
||||||
return [signature.name,
|
s.index,
|
||||||
signature.index,
|
[param.description[6:] for param in s.params])
|
||||||
[param.description[6:] for param in signature.params]]
|
for s in signatures]
|
||||||
|
|
||||||
# Run.
|
# Run.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
;; Thierry Volpiatto <thievol@posteo.net>
|
;; Thierry Volpiatto <thievol@posteo.net>
|
||||||
|
|
||||||
;; Keywords: dired async byte-compile
|
;; Keywords: dired async byte-compile
|
||||||
;; X-URL: https://github.com/jwiegley/dired-async
|
;; X-URL: https://github.com/jwiegley/emacs-async
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
(define-package "async" "20221217.649" "Asynchronous processing in Emacs"
|
(define-package "async" "20230528.622" "Asynchronous processing in Emacs"
|
||||||
'((emacs "24.4"))
|
'((emacs "24.4"))
|
||||||
:commit "c4772bec684776e93f1b8d845b452dc850ee2315" :authors
|
:commit "3ae74c0a4ba223ba373e0cb636c385e08d8838be" :authors
|
||||||
'(("John Wiegley" . "jwiegley@gmail.com"))
|
'(("John Wiegley" . "jwiegley@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Thierry Volpiatto" . "thievol@posteo.net"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Thierry Volpiatto" . "thievol@posteo.net")
|
'("Thierry Volpiatto" . "thievol@posteo.net")
|
||||||
:keywords
|
:keywords
|
||||||
|
|||||||
@@ -46,11 +46,17 @@
|
|||||||
(defvar async-send-over-pipe t)
|
(defvar async-send-over-pipe t)
|
||||||
(defvar async-in-child-emacs nil)
|
(defvar async-in-child-emacs nil)
|
||||||
(defvar async-callback nil)
|
(defvar async-callback nil)
|
||||||
(defvar async-callback-for-process nil)
|
(defvar async-callback-for-process nil
|
||||||
|
"Non-nil if the subprocess is not Emacs executing a lisp form.")
|
||||||
(defvar async-callback-value nil)
|
(defvar async-callback-value nil)
|
||||||
(defvar async-callback-value-set nil)
|
(defvar async-callback-value-set nil)
|
||||||
(defvar async-current-process nil)
|
(defvar async-current-process nil)
|
||||||
(defvar async--procvar nil)
|
(defvar async--procvar nil)
|
||||||
|
(defvar async-read-marker nil
|
||||||
|
"Position from which we read the last message packet.
|
||||||
|
|
||||||
|
Message packets are delivered from client line-by-line as base64
|
||||||
|
encoded strings.")
|
||||||
(defvar async-child-init nil
|
(defvar async-child-init nil
|
||||||
"Initialisation file for async child Emacs.
|
"Initialisation file for async child Emacs.
|
||||||
|
|
||||||
@@ -171,12 +177,16 @@ It is intended to be used as follows:
|
|||||||
(prog1
|
(prog1
|
||||||
(funcall async-callback proc)
|
(funcall async-callback proc)
|
||||||
(unless async-debug
|
(unless async-debug
|
||||||
(kill-buffer (current-buffer))))
|
;; we need to check this because theoretically
|
||||||
|
;; `async-callback' could've killed it already
|
||||||
|
(when (buffer-live-p (process-buffer proc))
|
||||||
|
(kill-buffer (process-buffer proc)))))
|
||||||
(set (make-local-variable 'async-callback-value) proc)
|
(set (make-local-variable 'async-callback-value) proc)
|
||||||
(set (make-local-variable 'async-callback-value-set) t))
|
(set (make-local-variable 'async-callback-value-set) t))
|
||||||
;; Maybe strip out unreadable "#"; They are replaced by
|
;; Maybe strip out unreadable "#"; They are replaced by
|
||||||
;; empty string unless they are prefixing a special
|
;; empty string unless they are prefixing a special
|
||||||
;; object like a marker. See issue #145.
|
;; object like a marker. See issue #145.
|
||||||
|
(widen)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
;; Transform markers in list like
|
;; Transform markers in list like
|
||||||
@@ -189,22 +199,70 @@ It is intended to be used as follows:
|
|||||||
(replace-match "(" t t))
|
(replace-match "(" t t))
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(backward-sexp)
|
(backward-sexp)
|
||||||
(async-handle-result async-callback (read (current-buffer))
|
(let ((value (read (current-buffer))))
|
||||||
(current-buffer)))
|
(async-handle-result async-callback value (current-buffer))))
|
||||||
(set (make-local-variable 'async-callback-value)
|
(set (make-local-variable 'async-callback-value)
|
||||||
(list 'error
|
(list 'error
|
||||||
(format "Async process '%s' failed with exit code %d"
|
(format "Async process '%s' failed with exit code %d"
|
||||||
(process-name proc) (process-exit-status proc))))
|
(process-name proc) (process-exit-status proc))))
|
||||||
(set (make-local-variable 'async-callback-value-set) t))))))
|
(set (make-local-variable 'async-callback-value-set) t))))))
|
||||||
|
|
||||||
|
(defun async-read-from-client (proc string)
|
||||||
|
"Process text from client process.
|
||||||
|
|
||||||
|
The string chunks usually arrive in maximum of 4096 bytes, so a
|
||||||
|
long client message might be split into multiple calls of this
|
||||||
|
function.
|
||||||
|
|
||||||
|
We use a marker `async-read-marker' to track the position of the
|
||||||
|
lasts complete line. Every time we get new input, we try to look
|
||||||
|
for newline, and if found, process the entire line and bump the
|
||||||
|
marker position to the end of this next line."
|
||||||
|
(with-current-buffer (process-buffer proc)
|
||||||
|
(goto-char (point-max))
|
||||||
|
(save-excursion
|
||||||
|
(insert string))
|
||||||
|
|
||||||
|
(while (search-forward "\n" nil t)
|
||||||
|
(save-excursion
|
||||||
|
(save-restriction
|
||||||
|
(widen)
|
||||||
|
(narrow-to-region async-read-marker (point))
|
||||||
|
(goto-char (point-min))
|
||||||
|
(let (msg)
|
||||||
|
(condition-case nil
|
||||||
|
;; It is safe to throw errors in the read because we
|
||||||
|
;; send messages always on their own line, and they
|
||||||
|
;; are always a base64 encoded string, so a message
|
||||||
|
;; will always read. We will also ignore the rest
|
||||||
|
;; of this line since there won't be anything
|
||||||
|
;; interesting.
|
||||||
|
(while (setq msg (read (current-buffer)))
|
||||||
|
(let ((msg-decoded (ignore-errors (base64-decode-string msg))))
|
||||||
|
(when msg-decoded
|
||||||
|
(setq msg-decoded (car (read-from-string msg-decoded)))
|
||||||
|
(when (and (listp msg-decoded)
|
||||||
|
(async-message-p msg-decoded)
|
||||||
|
async-callback)
|
||||||
|
(funcall async-callback msg-decoded)))))
|
||||||
|
;; This is OK, we reached the end of the chunk subprocess sent
|
||||||
|
;; at this time.
|
||||||
|
(invalid-read-syntax t)
|
||||||
|
(end-of-file t)))
|
||||||
|
(goto-char (point-max))
|
||||||
|
(move-marker async-read-marker (point)))))))
|
||||||
|
|
||||||
(defun async--receive-sexp (&optional stream)
|
(defun async--receive-sexp (&optional stream)
|
||||||
;; FIXME: Why use `utf-8-auto' instead of `utf-8-unix'? This is
|
;; FIXME: Why use `utf-8-auto' instead of `utf-8-unix'? This is
|
||||||
;; a communication channel over which we have complete control,
|
;; a communication channel over which we have complete control,
|
||||||
;; so we get to choose exactly which encoding and EOL we use, isn't it?
|
;; so we get to choose exactly which encoding and EOL we use, isn't
|
||||||
|
;; it?
|
||||||
|
;; UPDATE: We use now `utf-8-emacs-unix' instead of `utf-8-auto' as
|
||||||
|
;; recommended in bug#165.
|
||||||
(let ((sexp (decode-coding-string (base64-decode-string (read stream))
|
(let ((sexp (decode-coding-string (base64-decode-string (read stream))
|
||||||
'utf-8-auto))
|
'utf-8-emacs-unix))
|
||||||
;; Parent expects UTF-8 encoded text.
|
;; Parent expects UTF-8 encoded text.
|
||||||
(coding-system-for-write 'utf-8-auto))
|
(coding-system-for-write 'utf-8-emacs-unix))
|
||||||
(if async-debug
|
(if async-debug
|
||||||
(message "Received sexp {{{%s}}}" (pp-to-string sexp)))
|
(message "Received sexp {{{%s}}}" (pp-to-string sexp)))
|
||||||
(setq sexp (read sexp))
|
(setq sexp (read sexp))
|
||||||
@@ -221,7 +279,7 @@ It is intended to be used as follows:
|
|||||||
(print-symbols-bare t))
|
(print-symbols-bare t))
|
||||||
(prin1 sexp (current-buffer))
|
(prin1 sexp (current-buffer))
|
||||||
;; Just in case the string we're sending might contain EOF
|
;; Just in case the string we're sending might contain EOF
|
||||||
(encode-coding-region (point-min) (point-max) 'utf-8-auto)
|
(encode-coding-region (point-min) (point-max) 'utf-8-emacs-unix)
|
||||||
(base64-encode-region (point-min) (point-max) t)
|
(base64-encode-region (point-min) (point-max) t)
|
||||||
(goto-char (point-min)) (insert ?\")
|
(goto-char (point-min)) (insert ?\")
|
||||||
(goto-char (point-max)) (insert ?\" ?\n)))
|
(goto-char (point-max)) (insert ?\" ?\n)))
|
||||||
@@ -237,17 +295,27 @@ It is intended to be used as follows:
|
|||||||
"Called from the child Emacs process' command line."
|
"Called from the child Emacs process' command line."
|
||||||
;; Make sure 'message' and 'prin1' encode stuff in UTF-8, as parent
|
;; Make sure 'message' and 'prin1' encode stuff in UTF-8, as parent
|
||||||
;; process expects.
|
;; process expects.
|
||||||
(let ((coding-system-for-write 'utf-8-auto)
|
(let ((coding-system-for-write 'utf-8-emacs-unix)
|
||||||
(args-left command-line-args-left))
|
(args-left command-line-args-left))
|
||||||
(setq async-in-child-emacs t
|
(setq async-in-child-emacs t
|
||||||
debug-on-error async-debug
|
debug-on-error async-debug
|
||||||
command-line-args-left nil)
|
command-line-args-left nil)
|
||||||
(condition-case-unless-debug err
|
(condition-case-unless-debug err
|
||||||
(prin1 (funcall
|
(let ((ret (funcall
|
||||||
(async--receive-sexp (unless async-send-over-pipe
|
(async--receive-sexp (unless async-send-over-pipe
|
||||||
args-left))))
|
args-left)))))
|
||||||
|
;; The newlines makes client messages more robust and also
|
||||||
|
;; handle some weird line-buffering issues on windows.
|
||||||
|
;; Sometimes, the last "chunk" was not read by the filter,
|
||||||
|
;; so a newline here should force a buffer flush.
|
||||||
|
(princ "\n")
|
||||||
|
(prin1 ret)
|
||||||
|
(princ "\n"))
|
||||||
(error
|
(error
|
||||||
(prin1 (list 'async-signal err))))))
|
(progn
|
||||||
|
(princ "\n")
|
||||||
|
(prin1 (list 'async-signal err))
|
||||||
|
(princ "\n"))))))
|
||||||
|
|
||||||
(defun async-ready (future)
|
(defun async-ready (future)
|
||||||
"Query a FUTURE to see if it is ready.
|
"Query a FUTURE to see if it is ready.
|
||||||
@@ -277,20 +345,51 @@ its FINISH-FUNC is nil."
|
|||||||
#'identity async-callback-value (current-buffer))))))
|
#'identity async-callback-value (current-buffer))))))
|
||||||
|
|
||||||
(defun async-message-p (value)
|
(defun async-message-p (value)
|
||||||
"Return non-nil of VALUE is an async.el message packet."
|
"Return non-nil if VALUE is an async.el message packet."
|
||||||
(and (listp value)
|
(and (listp value)
|
||||||
(plist-get value :async-message)))
|
(plist-get value :async-message)))
|
||||||
|
|
||||||
(defun async-send (&rest args)
|
(defun async-send (process-or-key &rest args)
|
||||||
"Send the given messages to the asychronous Emacs PROCESS."
|
"Send the given message to the asychronous child or parent Emacs.
|
||||||
|
|
||||||
|
To send messages from the parent to a child, PROCESS-OR-KEY is
|
||||||
|
the child process object. ARGS is a plist. Example:
|
||||||
|
|
||||||
|
(async-send proc :operation :load-file :file \"this file\")
|
||||||
|
|
||||||
|
To send messages from the child to the parent, PROCESS-OR-KEY is
|
||||||
|
the first key of the plist, ARGS is a value followed by
|
||||||
|
optionally more key-value pairs. Example:
|
||||||
|
|
||||||
|
(async-send :status \"finished\" :file-size 123)"
|
||||||
(let ((args (append args '(:async-message t))))
|
(let ((args (append args '(:async-message t))))
|
||||||
(if async-in-child-emacs
|
(if async-in-child-emacs
|
||||||
(if async-callback
|
;; `princ' because async--insert-sexp already quotes everything.
|
||||||
(funcall async-callback args))
|
(princ
|
||||||
(async--transmit-sexp (car args) (list 'quote (cdr args))))))
|
(with-temp-buffer
|
||||||
|
(async--insert-sexp (cons process-or-key args))
|
||||||
|
;; always make sure that one message package has its own
|
||||||
|
;; line as there can be any random debug garbage printed
|
||||||
|
;; above it.
|
||||||
|
(concat "\n" (buffer-string))))
|
||||||
|
(async--transmit-sexp process-or-key (list 'quote args)))))
|
||||||
|
|
||||||
(defun async-receive ()
|
(defun async-receive ()
|
||||||
"Send the given messages to the asychronous Emacs PROCESS."
|
"Receive message from parent Emacs.
|
||||||
|
|
||||||
|
The child process blocks until a message is received.
|
||||||
|
|
||||||
|
Message is a plist with one key :async-message set to t always
|
||||||
|
automatically added to signify this plist is an async message.
|
||||||
|
|
||||||
|
You can use `async-message-p' to test if the payload was a
|
||||||
|
message.
|
||||||
|
|
||||||
|
Use
|
||||||
|
|
||||||
|
(let ((msg (async-receive))) ...)
|
||||||
|
|
||||||
|
to read and process a message."
|
||||||
(async--receive-sexp))
|
(async--receive-sexp))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
@@ -302,11 +401,26 @@ object will return the process object when the program is
|
|||||||
finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
|
finished. Set DEFAULT-DIRECTORY to change PROGRAM's current
|
||||||
working directory."
|
working directory."
|
||||||
(let* ((buf (generate-new-buffer (concat "*" name "*")))
|
(let* ((buf (generate-new-buffer (concat "*" name "*")))
|
||||||
|
(buf-err (generate-new-buffer (concat "*" name ":err*")))
|
||||||
(proc (let ((process-connection-type nil))
|
(proc (let ((process-connection-type nil))
|
||||||
(apply #'start-process name buf program program-args))))
|
(make-process
|
||||||
|
:name name
|
||||||
|
:buffer buf
|
||||||
|
:stderr buf-err
|
||||||
|
:command (cons program program-args)))))
|
||||||
|
(set-process-sentinel
|
||||||
|
(get-buffer-process buf-err)
|
||||||
|
(lambda (proc _change)
|
||||||
|
(unless (or async-debug (process-live-p proc))
|
||||||
|
(kill-buffer (process-buffer proc)))))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(set (make-local-variable 'async-callback) finish-func)
|
(set (make-local-variable 'async-callback) finish-func)
|
||||||
|
(set (make-local-variable 'async-read-marker)
|
||||||
|
(set-marker (make-marker) (point-min) buf))
|
||||||
|
(set-marker-insertion-type async-read-marker nil)
|
||||||
|
|
||||||
(set-process-sentinel proc #'async-when-done)
|
(set-process-sentinel proc #'async-when-done)
|
||||||
|
(set-process-filter proc #'async-read-from-client)
|
||||||
(unless (string= name "emacs")
|
(unless (string= name "emacs")
|
||||||
(set (make-local-variable 'async-callback-for-process) t))
|
(set (make-local-variable 'async-callback-for-process) t))
|
||||||
proc)))
|
proc)))
|
||||||
@@ -348,6 +462,16 @@ When done, the return value is passed to FINISH-FUNC. Example:
|
|||||||
(message \"Async process done, result should be 222: %s\"
|
(message \"Async process done, result should be 222: %s\"
|
||||||
result)))
|
result)))
|
||||||
|
|
||||||
|
If you call `async-send' from a child process, the message will
|
||||||
|
be also passed to the FINISH-FUNC. You can test RESULT to see if
|
||||||
|
it is a message by using `async-message-p'. If nil, it means
|
||||||
|
this is the final result. Example of the FINISH-FUNC:
|
||||||
|
|
||||||
|
(lambda (result)
|
||||||
|
(if (async-message-p result)
|
||||||
|
(message \"Received a message from child process: %s\" result)
|
||||||
|
(message \"Async process done, result: %s\" result)))
|
||||||
|
|
||||||
If FINISH-FUNC is nil or missing, a future is returned that can
|
If FINISH-FUNC is nil or missing, a future is returned that can
|
||||||
be inspected using `async-get', blocking until the value is
|
be inspected using `async-get', blocking until the value is
|
||||||
ready. Example:
|
ready. Example:
|
||||||
@@ -392,7 +516,7 @@ returns nil. It can still be useful, however, as an argument to
|
|||||||
`async-ready' or `async-wait'."
|
`async-ready' or `async-wait'."
|
||||||
(let ((sexp start-func)
|
(let ((sexp start-func)
|
||||||
;; Subordinate Emacs will send text encoded in UTF-8.
|
;; Subordinate Emacs will send text encoded in UTF-8.
|
||||||
(coding-system-for-read 'utf-8-auto))
|
(coding-system-for-read 'utf-8-emacs-unix))
|
||||||
(setq async--procvar
|
(setq async--procvar
|
||||||
(apply 'async-start-process
|
(apply 'async-start-process
|
||||||
"emacs" (file-truename
|
"emacs" (file-truename
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
;; Thierry Volpiatto <thievol@posteo.net>
|
;; Thierry Volpiatto <thievol@posteo.net>
|
||||||
|
|
||||||
;; Keywords: dired async network
|
;; Keywords: dired async network
|
||||||
;; X-URL: https://github.com/jwiegley/dired-async
|
;; X-URL: https://github.com/jwiegley/emacs-async
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
@@ -251,7 +251,7 @@ See `dired-create-files' for the behavior of arguments."
|
|||||||
(setq overwrite-query nil)
|
(setq overwrite-query nil)
|
||||||
(let ((total (length fn-list))
|
(let ((total (length fn-list))
|
||||||
failures async-fn-list skipped callback
|
failures async-fn-list skipped callback
|
||||||
async-quiet-switch)
|
async-quiet-switch create-dir)
|
||||||
(let (to)
|
(let (to)
|
||||||
(dolist (from fn-list)
|
(dolist (from fn-list)
|
||||||
(setq to (funcall name-constructor from))
|
(setq to (funcall name-constructor from))
|
||||||
@@ -344,7 +344,17 @@ ESC or `q' to not overwrite any of the remaining files,
|
|||||||
for destp = (file-exists-p to)
|
for destp = (file-exists-p to)
|
||||||
do (and bf destp
|
do (and bf destp
|
||||||
(with-current-buffer bf
|
(with-current-buffer bf
|
||||||
(set-visited-file-name to t t))))))))
|
(set-visited-file-name to t t)))))))
|
||||||
|
(let ((dirp (file-directory-p to))
|
||||||
|
(dest (file-name-directory to)))
|
||||||
|
(when (boundp 'dired-create-destination-dirs)
|
||||||
|
(setq create-dir
|
||||||
|
(cl-case dired-create-destination-dirs
|
||||||
|
(always 'always)
|
||||||
|
(ask (and (null dirp)
|
||||||
|
(null (file-directory-p dest))
|
||||||
|
(y-or-n-p (format "Create directory `%s'? " dest)))
|
||||||
|
'always))))))
|
||||||
;; Start async process.
|
;; Start async process.
|
||||||
(when async-fn-list
|
(when async-fn-list
|
||||||
(process-put
|
(process-put
|
||||||
@@ -353,7 +363,8 @@ ESC or `q' to not overwrite any of the remaining files,
|
|||||||
,(async-inject-variables dired-async-env-variables-regexp)
|
,(async-inject-variables dired-async-env-variables-regexp)
|
||||||
(let ((dired-recursive-copies (quote always))
|
(let ((dired-recursive-copies (quote always))
|
||||||
(dired-copy-preserve-time
|
(dired-copy-preserve-time
|
||||||
,dired-copy-preserve-time))
|
,dired-copy-preserve-time)
|
||||||
|
(dired-create-destination-dirs ',create-dir))
|
||||||
(setq overwrite-backup-query nil)
|
(setq overwrite-backup-query nil)
|
||||||
;; Inline `backup-file' as long as it is not
|
;; Inline `backup-file' as long as it is not
|
||||||
;; available in emacs.
|
;; available in emacs.
|
||||||
|
|||||||
15
lisp/avy/avy-pkg.el
Normal file
15
lisp/avy/avy-pkg.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(define-package "avy" "20230420.404" "Jump to arbitrary positions in visible text and select text quickly."
|
||||||
|
'((emacs "24.1")
|
||||||
|
(cl-lib "0.5"))
|
||||||
|
:commit "be612110cb116a38b8603df367942e2bb3d9bdbe" :authors
|
||||||
|
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Oleh Krehel" . "ohwoeowho@gmail.com")
|
||||||
|
:keywords
|
||||||
|
'("point" "location")
|
||||||
|
:url "https://github.com/abo-abo/avy")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
|
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
|
||||||
;; URL: https://github.com/abo-abo/avy
|
;; URL: https://github.com/abo-abo/avy
|
||||||
;; Package-Version: 20220910.1936
|
|
||||||
;; Package-Commit: 955c8dedd68c74f3cf692c1249513f048518c4c9
|
|
||||||
;; Version: 0.5.0
|
;; Version: 0.5.0
|
||||||
;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
|
;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
|
||||||
;; Keywords: point, location
|
;; Keywords: point, location
|
||||||
@@ -397,7 +395,7 @@ SEQ-LEN is how many elements of KEYS it takes to identify a match."
|
|||||||
|
|
||||||
(defvar avy-command nil
|
(defvar avy-command nil
|
||||||
"Store the current command symbol.
|
"Store the current command symbol.
|
||||||
E.g. 'avy-goto-line or 'avy-goto-char.")
|
E.g. `avy-goto-line' or `avy-goto-char'.")
|
||||||
|
|
||||||
(defun avy-tree (lst keys)
|
(defun avy-tree (lst keys)
|
||||||
"Coerce LST into a balanced tree.
|
"Coerce LST into a balanced tree.
|
||||||
@@ -840,11 +838,11 @@ Set `avy-style' according to COMMAND as well."
|
|||||||
avy-last-candidates))
|
avy-last-candidates))
|
||||||
(min-dist
|
(min-dist
|
||||||
(apply #'min
|
(apply #'min
|
||||||
(mapcar (lambda (x) (abs (- (caar x) (point)))) avy-last-candidates)))
|
(mapcar (lambda (x) (abs (- (if (listp (car x)) (caar x) (car x)) (point)))) avy-last-candidates)))
|
||||||
(pos
|
(pos
|
||||||
(cl-position-if
|
(cl-position-if
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
(= (- (caar x) (point)) min-dist))
|
(= (- (if (listp (car x)) (caar x) (car x)) (point)) min-dist))
|
||||||
avy-last-candidates)))
|
avy-last-candidates)))
|
||||||
(funcall advancer pos avy-last-candidates)))
|
(funcall advancer pos avy-last-candidates)))
|
||||||
|
|
||||||
@@ -854,7 +852,8 @@ Set `avy-style' according to COMMAND as well."
|
|||||||
(avy--last-candidates-cycle
|
(avy--last-candidates-cycle
|
||||||
(lambda (pos lst)
|
(lambda (pos lst)
|
||||||
(when (> pos 0)
|
(when (> pos 0)
|
||||||
(goto-char (caar (nth (1- pos) lst)))))))
|
(let ((candidate (nth (1- pos) lst)))
|
||||||
|
(goto-char (if (listp (car candidate)) (caar candidate) (car candidate))))))))
|
||||||
|
|
||||||
(defun avy-next ()
|
(defun avy-next ()
|
||||||
"Go to the next candidate of the last `avy-read'."
|
"Go to the next candidate of the last `avy-read'."
|
||||||
@@ -862,7 +861,8 @@ Set `avy-style' according to COMMAND as well."
|
|||||||
(avy--last-candidates-cycle
|
(avy--last-candidates-cycle
|
||||||
(lambda (pos lst)
|
(lambda (pos lst)
|
||||||
(when (< pos (1- (length lst)))
|
(when (< pos (1- (length lst)))
|
||||||
(goto-char (caar (nth (1+ pos) lst)))))))
|
(let ((candidate (nth (1+ pos) lst)))
|
||||||
|
(goto-char (if (listp (car candidate)) (caar candidate) (car candidate))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun avy-process (candidates &optional overlay-fn cleanup-fn)
|
(defun avy-process (candidates &optional overlay-fn cleanup-fn)
|
||||||
@@ -935,14 +935,14 @@ multiple OVERLAY-FN invocations."
|
|||||||
(null (assoc invisible buffer-invisibility-spec)))))
|
(null (assoc invisible buffer-invisibility-spec)))))
|
||||||
|
|
||||||
(defun avy--next-visible-point ()
|
(defun avy--next-visible-point ()
|
||||||
"Return the next closest point without 'invisible property."
|
"Return the next closest point without `invisible' property."
|
||||||
(let ((s (point)))
|
(let ((s (point)))
|
||||||
(while (and (not (= (point-max) (setq s (next-char-property-change s))))
|
(while (and (not (= (point-max) (setq s (next-char-property-change s))))
|
||||||
(not (avy--visible-p s))))
|
(not (avy--visible-p s))))
|
||||||
s))
|
s))
|
||||||
|
|
||||||
(defun avy--next-invisible-point ()
|
(defun avy--next-invisible-point ()
|
||||||
"Return the next closest point with 'invisible property."
|
"Return the next closest point with `invisible' property."
|
||||||
(let ((s (point)))
|
(let ((s (point)))
|
||||||
(while (and (not (= (point-max) (setq s (next-char-property-change s))))
|
(while (and (not (= (point-max) (setq s (next-char-property-change s))))
|
||||||
(avy--visible-p s)))
|
(avy--visible-p s)))
|
||||||
@@ -1666,6 +1666,7 @@ When BOTTOM-UP is non-nil, display avy candidates from top to bottom"
|
|||||||
(defvar linum-overlays)
|
(defvar linum-overlays)
|
||||||
(defvar linum-format)
|
(defvar linum-format)
|
||||||
(declare-function linum--face-width "linum")
|
(declare-function linum--face-width "linum")
|
||||||
|
(declare-function linum-mode "linum")
|
||||||
|
|
||||||
(define-minor-mode avy-linum-mode
|
(define-minor-mode avy-linum-mode
|
||||||
"Minor mode that uses avy hints for `linum-mode'."
|
"Minor mode that uses avy hints for `linum-mode'."
|
||||||
17
lisp/biblio-core/biblio-core-pkg.el
Normal file
17
lisp/biblio-core/biblio-core-pkg.el
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
(define-package "biblio-core" "20230202.1721" "A framework for looking up and displaying bibliographic entries"
|
||||||
|
'((emacs "24.3")
|
||||||
|
(let-alist "1.0.4")
|
||||||
|
(seq "1.11")
|
||||||
|
(dash "2.12.1"))
|
||||||
|
:commit "ee52f6cda82ea6fbc3b400e7b12132595cc0374c" :authors
|
||||||
|
'(("Clément Pit-Claudel" . "clement.pitclaudel@live.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Clément Pit-Claudel" . "clement.pitclaudel@live.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Clément Pit-Claudel" . "clement.pitclaudel@live.com")
|
||||||
|
:keywords
|
||||||
|
'("bib" "tex" "convenience" "hypermedia")
|
||||||
|
:url "https://github.com/cpitclaudel/biblio.el")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -3,9 +3,7 @@
|
|||||||
;; Copyright (C) 2016 Clément Pit-Claudel
|
;; Copyright (C) 2016 Clément Pit-Claudel
|
||||||
|
|
||||||
;; Author: Clément Pit-Claudel <clement.pitclaudel@live.com>
|
;; Author: Clément Pit-Claudel <clement.pitclaudel@live.com>
|
||||||
;; Version: 0.2.1
|
;; Version: 0.3
|
||||||
;; Package-Version: 20210418.406
|
|
||||||
;; Package-Commit: 517ec18f00f91b61481214b178f7ae0b8fbc499b
|
|
||||||
;; Package-Requires: ((emacs "24.3") (let-alist "1.0.4") (seq "1.11") (dash "2.12.1"))
|
;; Package-Requires: ((emacs "24.3") (let-alist "1.0.4") (seq "1.11") (dash "2.12.1"))
|
||||||
;; Keywords: bib, tex, convenience, hypermedia
|
;; Keywords: bib, tex, convenience, hypermedia
|
||||||
;; URL: https://github.com/cpitclaudel/biblio.el
|
;; URL: https://github.com/cpitclaudel/biblio.el
|
||||||
@@ -215,7 +213,7 @@ URL and CALLBACK; see `url-queue-retrieve'"
|
|||||||
(if biblio-synchronous
|
(if biblio-synchronous
|
||||||
(with-current-buffer (url-retrieve-synchronously url)
|
(with-current-buffer (url-retrieve-synchronously url)
|
||||||
(funcall callback nil))
|
(funcall callback nil))
|
||||||
(setq url-queue-timeout 1)
|
(setq url-queue-timeout 5)
|
||||||
(url-queue-retrieve url callback)))
|
(url-queue-retrieve url callback)))
|
||||||
|
|
||||||
(defun biblio-strip (str)
|
(defun biblio-strip (str)
|
||||||
@@ -485,7 +483,10 @@ will be called with the metadata of the current item.")
|
|||||||
|
|
||||||
(defun biblio--completing-read-function ()
|
(defun biblio--completing-read-function ()
|
||||||
"Return ido, unless user picked another completion package."
|
"Return ido, unless user picked another completion package."
|
||||||
(if (eq completing-read-function #'completing-read-default)
|
(if (and (eq completing-read-function #'completing-read-default)
|
||||||
|
(not (catch 'advised ;; https://github.com/cpitclaudel/biblio.el/issues/55
|
||||||
|
(advice-mapc (lambda (&rest _args) (throw 'advised t))
|
||||||
|
'completing-read-default))))
|
||||||
#'ido-completing-read
|
#'ido-completing-read
|
||||||
completing-read-function))
|
completing-read-function))
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
(define-package "biblio" "20210418.406" "Browse and import bibliographic references from CrossRef, arXiv, DBLP, HAL, Dissemin, and doi.org"
|
(define-package "biblio" "20230202.1721" "Browse and import bibliographic references from CrossRef, arXiv, DBLP, HAL, Dissemin, and doi.org"
|
||||||
'((emacs "24.3")
|
'((emacs "24.3")
|
||||||
(biblio-core "0.2"))
|
(biblio-core "0.2"))
|
||||||
:commit "368f45bf9a64450705a63598224c5af96160af76" :authors
|
:commit "ee52f6cda82ea6fbc3b400e7b12132595cc0374c" :authors
|
||||||
'(("Clément Pit-Claudel" . "clement.pitclaudel@live.com"))
|
'(("Clément Pit-Claudel" . "clement.pitclaudel@live.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Clément Pit-Claudel" . "clement.pitclaudel@live.com")
|
'("Clément Pit-Claudel" . "clement.pitclaudel@live.com")
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
;; Copyright (C) 2016 Clément Pit-Claudel
|
;; Copyright (C) 2016 Clément Pit-Claudel
|
||||||
|
|
||||||
;; Author: Clément Pit-Claudel <clement.pitclaudel@live.com>
|
;; Author: Clément Pit-Claudel <clement.pitclaudel@live.com>
|
||||||
;; Version: 0.2
|
;; Version: 0.3
|
||||||
;; Package-Requires: ((emacs "24.3") (biblio-core "0.2"))
|
;; Package-Requires: ((emacs "24.3") (biblio-core "0.3"))
|
||||||
;; Keywords: bib, tex, convenience, hypermedia
|
;; Keywords: bib, tex, convenience, hypermedia
|
||||||
;; URL: https://github.com/cpitclaudel/biblio.el
|
;; URL: https://github.com/cpitclaudel/biblio.el
|
||||||
|
|
||||||
|
|||||||
19
lisp/bibtex-completion/bibtex-completion-pkg.el
Normal file
19
lisp/bibtex-completion/bibtex-completion-pkg.el
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(define-package "bibtex-completion" "20230918.953" "A BibTeX backend for completion frameworks"
|
||||||
|
'((parsebib "1.0")
|
||||||
|
(s "1.9.0")
|
||||||
|
(dash "2.6.0")
|
||||||
|
(f "0.16.2")
|
||||||
|
(cl-lib "0.5")
|
||||||
|
(biblio "0.2")
|
||||||
|
(emacs "26.1"))
|
||||||
|
:commit "95551744de8210867e9d34feaf47ae639ea04114" :authors
|
||||||
|
'(("Titus von der Malsburg" . "malsburg@posteo.de")
|
||||||
|
("Justin Burkett" . "justin@burkett.cc"))
|
||||||
|
:maintainers
|
||||||
|
'(("Titus von der Malsburg" . "malsburg@posteo.de"))
|
||||||
|
:maintainer
|
||||||
|
'("Titus von der Malsburg" . "malsburg@posteo.de")
|
||||||
|
:url "https://github.com/tmalsburg/helm-bibtex")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
;; Justin Burkett <justin@burkett.cc>
|
;; Justin Burkett <justin@burkett.cc>
|
||||||
;; Maintainer: Titus von der Malsburg <malsburg@posteo.de>
|
;; Maintainer: Titus von der Malsburg <malsburg@posteo.de>
|
||||||
;; URL: https://github.com/tmalsburg/helm-bibtex
|
;; URL: https://github.com/tmalsburg/helm-bibtex
|
||||||
;; Package-Version: 20221024.857
|
|
||||||
;; Package-Commit: 78f5931e1cc82e7ae2bcf0508cf31d0d1629a8dd
|
|
||||||
;; Version: 1.0.0
|
;; Version: 1.0.0
|
||||||
;; Package-Requires: ((parsebib "1.0") (s "1.9.0") (dash "2.6.0") (f "0.16.2") (cl-lib "0.5") (biblio "0.2") (emacs "26.1"))
|
;; Package-Requires: ((parsebib "1.0") (s "1.9.0") (dash "2.6.0") (f "0.16.2") (cl-lib "0.5") (biblio "0.2") (emacs "26.1"))
|
||||||
|
|
||||||
@@ -1187,6 +1185,9 @@ string if FIELD is not present in ENTRY and DEFAULT is nil."
|
|||||||
("editor-abbrev"
|
("editor-abbrev"
|
||||||
(when-let ((value (bibtex-completion-get-value "editor" entry)))
|
(when-let ((value (bibtex-completion-get-value "editor" entry)))
|
||||||
(bibtex-completion-apa-format-editors-abbrev value)))
|
(bibtex-completion-apa-format-editors-abbrev value)))
|
||||||
|
((or "journal" "journaltitle")
|
||||||
|
(or (bibtex-completion-get-value "journal" entry)
|
||||||
|
(bibtex-completion-get-value "journaltitle" entry)))
|
||||||
(_
|
(_
|
||||||
;; Real fields:
|
;; Real fields:
|
||||||
(let ((value (bibtex-completion-get-value field entry)))
|
(let ((value (bibtex-completion-get-value field entry)))
|
||||||
@@ -1218,9 +1219,11 @@ string if FIELD is not present in ENTRY and DEFAULT is nil."
|
|||||||
;; the journal in its title.
|
;; the journal in its title.
|
||||||
("pages" (s-join "–" (s-split "[^0-9]+" value t)))
|
("pages" (s-join "–" (s-split "[^0-9]+" value t)))
|
||||||
("doi" (s-concat " http://dx.doi.org/" value))
|
("doi" (s-concat " http://dx.doi.org/" value))
|
||||||
("year" (or value
|
("year" value)
|
||||||
(car (split-string (bibtex-completion-get-value "date" entry "") "-"))))
|
(_ value))
|
||||||
(_ value))))))
|
(pcase field
|
||||||
|
("year" (car (split-string (bibtex-completion-get-value "date" entry "") "-"))))
|
||||||
|
))))
|
||||||
default ""))
|
default ""))
|
||||||
|
|
||||||
(defun bibtex-completion-apa-format-authors (value &optional abbrev)
|
(defun bibtex-completion-apa-format-authors (value &optional abbrev)
|
||||||
14
lisp/bind-key/bind-key-pkg.el
Normal file
14
lisp/bind-key/bind-key-pkg.el
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
(define-package "bind-key" "20230203.2004" "A simple way to manage personal keybindings"
|
||||||
|
'((emacs "24.3"))
|
||||||
|
:commit "77945e002f11440eae72d8730d3de218163d551e" :authors
|
||||||
|
'(("John Wiegley" . "johnw@newartisans.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("John Wiegley" . "johnw@newartisans.com"))
|
||||||
|
:maintainer
|
||||||
|
'("John Wiegley" . "johnw@newartisans.com")
|
||||||
|
:keywords
|
||||||
|
'("keys" "keybinding" "config" "dotemacs" "extensions")
|
||||||
|
:url "https://github.com/jwiegley/use-package")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -6,8 +6,6 @@
|
|||||||
;; Maintainer: John Wiegley <johnw@newartisans.com>
|
;; Maintainer: John Wiegley <johnw@newartisans.com>
|
||||||
;; Created: 16 Jun 2012
|
;; Created: 16 Jun 2012
|
||||||
;; Version: 2.4.1
|
;; Version: 2.4.1
|
||||||
;; Package-Version: 20221209.2013
|
|
||||||
;; Package-Commit: bcf0984cf55b70fe6896c6a15f61df92b24f8ffd
|
|
||||||
;; Package-Requires: ((emacs "24.3"))
|
;; Package-Requires: ((emacs "24.3"))
|
||||||
;; Keywords: keys keybinding config dotemacs extensions
|
;; Keywords: keys keybinding config dotemacs extensions
|
||||||
;; URL: https://github.com/jwiegley/use-package
|
;; URL: https://github.com/jwiegley/use-package
|
||||||
@@ -168,7 +166,8 @@ KEY-NAME may be a vector, in which case it is passed straight to
|
|||||||
spelled-out keystrokes, e.g., \"C-c C-z\". See the documentation
|
spelled-out keystrokes, e.g., \"C-c C-z\". See the documentation
|
||||||
of `edmacro-mode' for details.
|
of `edmacro-mode' for details.
|
||||||
|
|
||||||
COMMAND must be an interactive function or lambda form.
|
COMMAND must be an interactive function, lambda form, or a cons
|
||||||
|
`(STRING . DEFN)'.
|
||||||
|
|
||||||
KEYMAP, if present, should be a keymap variable or symbol.
|
KEYMAP, if present, should be a keymap variable or symbol.
|
||||||
For example:
|
For example:
|
||||||
15
lisp/cfrs/cfrs-pkg.el
Normal file
15
lisp/cfrs/cfrs-pkg.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(define-package "cfrs" "20220129.1149" "Child-frame based read-string"
|
||||||
|
'((emacs "26.1")
|
||||||
|
(dash "2.11.0")
|
||||||
|
(s "1.10.0")
|
||||||
|
(posframe "0.6.0"))
|
||||||
|
:commit "f3a21f237b2a54e6b9f8a420a9da42b4f0a63121" :authors
|
||||||
|
'(("Alexander Miller" . "alexanderm@web.de"))
|
||||||
|
:maintainers
|
||||||
|
'(("Alexander Miller" . "alexanderm@web.de"))
|
||||||
|
:maintainer
|
||||||
|
'("Alexander Miller" . "alexanderm@web.de")
|
||||||
|
:url "https://github.com/Alexander-Miller/cfrs")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
;; Author: Alexander Miller <alexanderm@web.de>
|
;; Author: Alexander Miller <alexanderm@web.de>
|
||||||
;; Package-Requires: ((emacs "26.1") (dash "2.11.0") (s "1.10.0") (posframe "0.6.0"))
|
;; Package-Requires: ((emacs "26.1") (dash "2.11.0") (s "1.10.0") (posframe "0.6.0"))
|
||||||
;; Package-Commit: f3a21f237b2a54e6b9f8a420a9da42b4f0a63121
|
;; Package-Version: 1.6.0
|
||||||
;; Package-Version: 20220129.1149
|
|
||||||
;; Package-X-Original-Version: 1.6.0
|
|
||||||
;; Homepage: https://github.com/Alexander-Miller/cfrs
|
;; Homepage: https://github.com/Alexander-Miller/cfrs
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
@@ -141,7 +141,7 @@ links else). For legacy reasons, any other value is treated as
|
|||||||
;; Add cite prefix and suffix
|
;; Add cite prefix and suffix
|
||||||
(when (s-present-p plain-suff)
|
(when (s-present-p plain-suff)
|
||||||
(push (citeproc-rt-from-str suff) result)
|
(push (citeproc-rt-from-str suff) result)
|
||||||
(unless (= (aref plain-suff 0) ?\s)
|
(unless (memql (aref plain-suff 0) '(?, ?\s))
|
||||||
(push " " result)))
|
(push " " result)))
|
||||||
(push rendered-varlist result)
|
(push rendered-varlist result)
|
||||||
(when (s-present-p plain-pref)
|
(when (s-present-p plain-pref)
|
||||||
@@ -237,11 +237,11 @@ For the optional INTERNAL-LINKS argument see
|
|||||||
(cadr first-elt)
|
(cadr first-elt)
|
||||||
first-elt))
|
first-elt))
|
||||||
(author-cite
|
(author-cite
|
||||||
(append '((suppress-author . nil) (stop-rendering-at . names))
|
(append '((suppress-author . nil) (stop-rendering-at . names)
|
||||||
|
(prefix) (suffix) (locator))
|
||||||
first-cite))
|
first-cite))
|
||||||
(rendered-author (citeproc-cite--render author-cite style 'no-links)))
|
(rendered-author (citeproc-cite--render author-cite style 'no-links)))
|
||||||
(when (and (listp rendered-author)
|
(when (listp rendered-author)
|
||||||
(alist-get 'stopped-rendering (car rendered-author)))
|
|
||||||
(setq result `(nil ,rendered-author " " ,result)))))
|
(setq result `(nil ,rendered-author " " ,result)))))
|
||||||
;; Capitalize first
|
;; Capitalize first
|
||||||
(when (citeproc-citation-capitalize-first c)
|
(when (citeproc-citation-capitalize-first c)
|
||||||
@@ -548,6 +548,7 @@ Possible values are `last', `first' and `subsequent'.")
|
|||||||
(unless (citeproc-proc-finalized proc)
|
(unless (citeproc-proc-finalized proc)
|
||||||
(citeproc-proc-process-uncited proc)
|
(citeproc-proc-process-uncited proc)
|
||||||
(citeproc-sb-add-subbib-info proc)
|
(citeproc-sb-add-subbib-info proc)
|
||||||
|
(citeproc-sb-prune-unrendered proc)
|
||||||
(citeproc-proc-update-sortkeys proc)
|
(citeproc-proc-update-sortkeys proc)
|
||||||
(citeproc-proc-sort-itds proc)
|
(citeproc-proc-sort-itds proc)
|
||||||
(citeproc-proc-update-positions proc)
|
(citeproc-proc-update-positions proc)
|
||||||
|
|||||||
@@ -164,8 +164,10 @@ Performs finalization by removing unnecessary zero-width spaces."
|
|||||||
(setq result (citeproc-s-replace-all-seq
|
(setq result (citeproc-s-replace-all-seq
|
||||||
result '((" " . " ") (" " . " ") ("," . ",") (";" . ";")
|
result '((" " . " ") (" " . " ") ("," . ",") (";" . ";")
|
||||||
(":" . ":") ("." . "."))))
|
(":" . ":") ("." . "."))))
|
||||||
;; Starting and ending z-w spaces are also removed.
|
;; Starting and ending z-w spaces are also removed, but not before an
|
||||||
(when (= (aref result 0) 8203)
|
;; asterisk to avoid creating an Org heading.
|
||||||
|
(when (and (= (aref result 0) 8203)
|
||||||
|
(not (= (aref result 1) ?*)))
|
||||||
(setq result (substring result 1)))
|
(setq result (substring result 1)))
|
||||||
(when (= (aref result (- (length result) 1)) 8203)
|
(when (= (aref result (- (length result) 1)) 8203)
|
||||||
(setq result (substring result 0 -1))))
|
(setq result (substring result 0 -1))))
|
||||||
@@ -371,7 +373,9 @@ CSL tests."
|
|||||||
:rt (citeproc-formatter-fun-create citeproc-fmt--org-latex-alist)
|
:rt (citeproc-formatter-fun-create citeproc-fmt--org-latex-alist)
|
||||||
:bib #'citeproc-fmt--org-latex-bib-formatter))
|
:bib #'citeproc-fmt--org-latex-bib-formatter))
|
||||||
(latex . ,(citeproc-formatter-create
|
(latex . ,(citeproc-formatter-create
|
||||||
:rt (citeproc-formatter-fun-create citeproc-fmt--latex-alist)))
|
:rt (citeproc-formatter-fun-create citeproc-fmt--latex-alist)
|
||||||
|
:bib (lambda (x _) (concat (mapconcat #'identity x "\n\n")
|
||||||
|
"\\bigskip"))))
|
||||||
(plain . ,(citeproc-formatter-create :rt #'citeproc-rt-to-plain
|
(plain . ,(citeproc-formatter-create :rt #'citeproc-rt-to-plain
|
||||||
:no-external-links t)))
|
:no-external-links t)))
|
||||||
"Alist mapping supported output formats to formatter structs.")
|
"Alist mapping supported output formats to formatter structs.")
|
||||||
|
|||||||
@@ -45,9 +45,10 @@ OCCURRED-BEFORE is used during bibliography generation to
|
|||||||
DISAMB-POS contains the position on which cite disambiguation is
|
DISAMB-POS contains the position on which cite disambiguation is
|
||||||
based. Possible values are 'first, 'ibid and 'subsequent,
|
based. Possible values are 'first, 'ibid and 'subsequent,
|
||||||
SUBBIB-NOS is a list of numeric indexes of sub-bibliographies
|
SUBBIB-NOS is a list of numeric indexes of sub-bibliographies
|
||||||
in which the item occurs."
|
in which the item occurs,
|
||||||
|
UNCITED is t iff the item has no associated citation."
|
||||||
varvals rawcite rawbibitem rc-uptodate sort-key occurred-before
|
varvals rawcite rawbibitem rc-uptodate sort-key occurred-before
|
||||||
disamb-pos subbib-nos)
|
disamb-pos subbib-nos uncited)
|
||||||
|
|
||||||
(defun citeproc-itd-getvar (itd var)
|
(defun citeproc-itd-getvar (itd var)
|
||||||
"Return itemdata ITD's value for VAR ."
|
"Return itemdata ITD's value for VAR ."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
(define-package "citeproc" "20221216.1238" "A CSL 1.0.2 Citation Processor"
|
(define-package "citeproc" "20230228.1414" "A CSL 1.0.2 Citation Processor"
|
||||||
'((emacs "26")
|
'((emacs "26")
|
||||||
(dash "2.13.0")
|
(dash "2.13.0")
|
||||||
(s "1.12.0")
|
(s "1.12.0")
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
(string-inflection "1.0")
|
(string-inflection "1.0")
|
||||||
(org "9")
|
(org "9")
|
||||||
(parsebib "2.4"))
|
(parsebib "2.4"))
|
||||||
:commit "3cb83db147bdda208520246e82dbf9878fa3cbd0" :authors
|
:commit "290320fc579f886255f00d7268600df7fa5cc7e8" :authors
|
||||||
|
'(("András Simonyi" . "andras.simonyi@gmail.com"))
|
||||||
|
:maintainers
|
||||||
'(("András Simonyi" . "andras.simonyi@gmail.com"))
|
'(("András Simonyi" . "andras.simonyi@gmail.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("András Simonyi" . "andras.simonyi@gmail.com")
|
'("András Simonyi" . "andras.simonyi@gmail.com")
|
||||||
|
|||||||
@@ -99,11 +99,11 @@ sorted."
|
|||||||
(push (cons 'editor-translator editor) result))
|
(push (cons 'editor-translator editor) result))
|
||||||
result))
|
result))
|
||||||
|
|
||||||
(defun citeproc-proc--put-item (proc item itemid)
|
(defun citeproc-proc--put-item (proc item itemid &optional uncited)
|
||||||
"Put parsed csl-json ITEM with ITEMID into PROC.
|
"Put parsed csl-json ITEM with ITEMID into PROC.
|
||||||
Return the added itemdata structure."
|
Return the added itemdata structure."
|
||||||
(let* ((int-vars (citeproc-proc--internalize-item proc item))
|
(let* ((int-vars (citeproc-proc--internalize-item proc item))
|
||||||
(itemdata (citeproc-itemdata-create :varvals int-vars :rc-uptodate nil)))
|
(itemdata (citeproc-itemdata-create :varvals int-vars :uncited uncited)))
|
||||||
(citeproc-proc-put-itd-put itemid itemdata proc)
|
(citeproc-proc-put-itd-put itemid itemdata proc)
|
||||||
(citeproc-itd-setvar itemdata 'citation-number
|
(citeproc-itd-setvar itemdata 'citation-number
|
||||||
(number-to-string (hash-table-count
|
(number-to-string (hash-table-count
|
||||||
@@ -150,7 +150,7 @@ Return the itemdata struct that was added."
|
|||||||
(citeproc-proc--put-item
|
(citeproc-proc--put-item
|
||||||
proc
|
proc
|
||||||
(or item `((unprocessed-with-id . ,id)))
|
(or item `((unprocessed-with-id . ,id)))
|
||||||
id))))))
|
id t))))))
|
||||||
|
|
||||||
(defun citeproc-proc-delete-occurrence-info (proc)
|
(defun citeproc-proc-delete-occurrence-info (proc)
|
||||||
"Remove all itemdata occurrence info from PROC."
|
"Remove all itemdata occurrence info from PROC."
|
||||||
@@ -225,6 +225,11 @@ Return the PROC-internal representation of REP."
|
|||||||
(when bib-sort (setf (citeproc-style-bib-sort style) (byte-compile bib-sort)))
|
(when bib-sort (setf (citeproc-style-bib-sort style) (byte-compile bib-sort)))
|
||||||
(when cite-sort (setf (citeproc-style-cite-sort style) (byte-compile cite-sort)))))
|
(when cite-sort (setf (citeproc-style-cite-sort style) (byte-compile cite-sort)))))
|
||||||
|
|
||||||
|
(defun citeproc-proc-filtered-bib-p (proc)
|
||||||
|
"Return whether PROC has nontrivial filters"
|
||||||
|
(let ((filters (citeproc-proc-bib-filters proc)))
|
||||||
|
(and filters (not (equal filters '(nil))))))
|
||||||
|
|
||||||
(provide 'citeproc-proc)
|
(provide 'citeproc-proc)
|
||||||
|
|
||||||
;;; citeproc-proc.el ends here
|
;;; citeproc-proc.el ends here
|
||||||
|
|||||||
@@ -169,17 +169,17 @@ MODE is either `cite' or `bib'."
|
|||||||
|
|
||||||
(defun citeproc-proc-sort-itds (proc)
|
(defun citeproc-proc-sort-itds (proc)
|
||||||
"Sort the itemdata in PROC."
|
"Sort the itemdata in PROC."
|
||||||
(let ((sorted-bib-p (citeproc-style-bib-sort (citeproc-proc-style proc)))
|
(let ((is-sorted-bib (citeproc-style-bib-sort (citeproc-proc-style proc)))
|
||||||
(filters (citeproc-proc-bib-filters proc)))
|
(is-filtered (citeproc-proc-filtered-bib-p proc)))
|
||||||
(when (or sorted-bib-p filters)
|
(when (or is-sorted-bib is-filtered)
|
||||||
(let* ((itds (hash-table-values (citeproc-proc-itemdata proc)))
|
(let* ((itds (hash-table-values (citeproc-proc-itemdata proc)))
|
||||||
(sorted (if sorted-bib-p
|
(sorted (if is-sorted-bib
|
||||||
(let ((sort-orders (citeproc-style-bib-sort-orders
|
(let ((sort-orders (citeproc-style-bib-sort-orders
|
||||||
(citeproc-proc-style proc))))
|
(citeproc-proc-style proc))))
|
||||||
(citeproc-sort-itds itds sort-orders))
|
(citeproc-sort-itds itds sort-orders))
|
||||||
(citeproc-sort-itds-on-citnum itds))))
|
(citeproc-sort-itds-on-citnum itds))))
|
||||||
;; Additionally sort according to subbibliographies if there are filters.
|
;; Additionally sort according to subbibliographies if there are filters.
|
||||||
(when filters
|
(when is-filtered
|
||||||
(setq sorted (sort sorted #'citeproc-sort-itds-on-subbib)))
|
(setq sorted (sort sorted #'citeproc-sort-itds-on-subbib)))
|
||||||
;; Set the CSL citation-number field according to the sort order.
|
;; Set the CSL citation-number field according to the sort order.
|
||||||
(--each-indexed sorted
|
(--each-indexed sorted
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ see the documentation of `citeproc-add-subbib-filters'."
|
|||||||
|
|
||||||
(defun citeproc-sb-add-subbib-info (proc)
|
(defun citeproc-sb-add-subbib-info (proc)
|
||||||
"Add subbibliography information to the items in PROC."
|
"Add subbibliography information to the items in PROC."
|
||||||
|
(when (citeproc-proc-filtered-bib-p proc)
|
||||||
(let ((filters (citeproc-proc-bib-filters proc)))
|
(let ((filters (citeproc-proc-bib-filters proc)))
|
||||||
(maphash
|
(maphash
|
||||||
(lambda (_ itemdata)
|
(lambda (_ itemdata)
|
||||||
@@ -64,7 +65,21 @@ see the documentation of `citeproc-add-subbib-filters'."
|
|||||||
(when (citeproc-sb--match-p varvals it) it-index)
|
(when (citeproc-sb--match-p varvals it) it-index)
|
||||||
filters))))
|
filters))))
|
||||||
(setf (citeproc-itemdata-subbib-nos itemdata) subbib-nos)))
|
(setf (citeproc-itemdata-subbib-nos itemdata) subbib-nos)))
|
||||||
(citeproc-proc-itemdata proc))))
|
(citeproc-proc-itemdata proc)))))
|
||||||
|
|
||||||
|
(defun citeproc-sb-prune-unrendered (proc)
|
||||||
|
"Remove all itemdata about unrendered items from PROC.
|
||||||
|
An item is unrendered if
|
||||||
|
- there are subbibfilters but none of them matches it, and
|
||||||
|
- it is not cited."
|
||||||
|
(when (citeproc-proc-filtered-bib-p proc)
|
||||||
|
(let ((itemdata (citeproc-proc-itemdata proc)))
|
||||||
|
(maphash
|
||||||
|
(lambda (id data)
|
||||||
|
(when (and (citeproc-itemdata-uncited data)
|
||||||
|
(null (citeproc-itemdata-subbib-nos data)))
|
||||||
|
(remhash id itemdata)))
|
||||||
|
itemdata))))
|
||||||
|
|
||||||
(provide 'citeproc-subbibs)
|
(provide 'citeproc-subbibs)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
;;; citeproc.el --- A CSL 1.0.2 Citation Processor -*- lexical-binding: t; -*-
|
;;; citeproc.el --- A CSL 1.0.2 Citation Processor -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Copyright (C) 2017-2022 András Simonyi
|
;; Copyright (C) 2017-2023 András Simonyi
|
||||||
|
|
||||||
;; Author: András Simonyi <andras.simonyi@gmail.com>
|
;; Author: András Simonyi <andras.simonyi@gmail.com>
|
||||||
;; Maintainer: András Simonyi <andras.simonyi@gmail.com>
|
;; Maintainer: András Simonyi <andras.simonyi@gmail.com>
|
||||||
;; URL: https://github.com/andras-simonyi/citeproc-el
|
;; URL: https://github.com/andras-simonyi/citeproc-el
|
||||||
;; Keywords: bib
|
;; Keywords: bib
|
||||||
;; Package-Requires: ((emacs "26") (dash "2.13.0") (s "1.12.0") (f "0.18.0") (queue "0.2") (string-inflection "1.0") (org "9") (parsebib "2.4"))
|
;; Package-Requires: ((emacs "26") (dash "2.13.0") (s "1.12.0") (f "0.18.0") (queue "0.2") (string-inflection "1.0") (org "9") (parsebib "2.4"))
|
||||||
;; Version: 0.9
|
;; Version: 0.9.3
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
@@ -196,8 +196,8 @@ formatting parameters keyed to the parameter names as symbols:
|
|||||||
punct-in-quote)))
|
punct-in-quote)))
|
||||||
itemdata)
|
itemdata)
|
||||||
(let* ((raw-bib
|
(let* ((raw-bib
|
||||||
(if (cdr filters)
|
(if (citeproc-proc-filtered-bib-p proc)
|
||||||
;; There are several filters, we need to select and sort the subbibs.
|
;; There are filters, we need to select and sort the subbibs.
|
||||||
(let* ((nr-of-filters (length filters))
|
(let* ((nr-of-filters (length filters))
|
||||||
(result (make-list nr-of-filters nil))
|
(result (make-list nr-of-filters nil))
|
||||||
;; We store boolean to-be-sorted flags for each sub-bib
|
;; We store boolean to-be-sorted flags for each sub-bib
|
||||||
@@ -228,7 +228,7 @@ formatting parameters keyed to the parameter names as symbols:
|
|||||||
result))
|
result))
|
||||||
;; Generate the raw bibs.
|
;; Generate the raw bibs.
|
||||||
(--map (mapcar #'citeproc-itemdata-rawbibitem it) result))
|
(--map (mapcar #'citeproc-itemdata-rawbibitem it) result))
|
||||||
;; No filters, so raw-bib is a list containg a single raw bibliograhy.
|
;; No filters, so raw-bib is a list containing a single raw bibliograhy.
|
||||||
(list (mapcar #'citeproc-itemdata-rawbibitem
|
(list (mapcar #'citeproc-itemdata-rawbibitem
|
||||||
(citeproc-sort-itds-on-citnum (hash-table-values itemdata))))))
|
(citeproc-sort-itds-on-citnum (hash-table-values itemdata))))))
|
||||||
;; Perform author-substitution.
|
;; Perform author-substitution.
|
||||||
|
|||||||
14
lisp/cl-libify/cl-libify-pkg.el
Normal file
14
lisp/cl-libify/cl-libify-pkg.el
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
(define-package "cl-libify" "20181130.230" "Update elisp code to use cl-lib instead of cl"
|
||||||
|
'((emacs "25"))
|
||||||
|
:commit "e205b96f944a4f312fd523804cbbaf00027a3c8b" :authors
|
||||||
|
'(("Steve Purcell" . "steve@sanityinc.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Steve Purcell" . "steve@sanityinc.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Steve Purcell" . "steve@sanityinc.com")
|
||||||
|
:keywords
|
||||||
|
'("lisp")
|
||||||
|
:url "https://github.com/purcell/cl-libify")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,11 +4,9 @@
|
|||||||
|
|
||||||
;; Author: Steve Purcell <steve@sanityinc.com>
|
;; Author: Steve Purcell <steve@sanityinc.com>
|
||||||
;; Keywords: lisp
|
;; Keywords: lisp
|
||||||
;; Package-Commit: e205b96f944a4f312fd523804cbbaf00027a3c8b
|
|
||||||
;; Homepage: https://github.com/purcell/cl-libify
|
;; Homepage: https://github.com/purcell/cl-libify
|
||||||
;; Package-Requires: ((emacs "25"))
|
;; Package-Requires: ((emacs "25"))
|
||||||
;; Package-Version: 20181130.230
|
;; Package-Version: 0
|
||||||
;; Package-X-Original-Version: 0
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
19
lisp/company-anaconda/company-anaconda-pkg.el
Normal file
19
lisp/company-anaconda/company-anaconda-pkg.el
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
(define-package "company-anaconda" "20230821.2126" "Anaconda backend for company-mode"
|
||||||
|
'((emacs "25.1")
|
||||||
|
(company "0.8.0")
|
||||||
|
(anaconda-mode "0.1.1")
|
||||||
|
(cl-lib "0.5.0")
|
||||||
|
(dash "2.6.0")
|
||||||
|
(s "1.9"))
|
||||||
|
:commit "14867265e474f7a919120bbac74870c3256cbacf" :authors
|
||||||
|
'(("Artem Malyshev" . "proofit404@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Artem Malyshev" . "proofit404@gmail.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Artem Malyshev" . "proofit404@gmail.com")
|
||||||
|
:keywords
|
||||||
|
'("convenience" "company" "anaconda")
|
||||||
|
:url "https://github.com/proofit404/anaconda-mode")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,10 +4,9 @@
|
|||||||
|
|
||||||
;; Author: Artem Malyshev <proofit404@gmail.com>
|
;; Author: Artem Malyshev <proofit404@gmail.com>
|
||||||
;; URL: https://github.com/proofit404/anaconda-mode
|
;; URL: https://github.com/proofit404/anaconda-mode
|
||||||
;; Package-Version: 20200404.1859
|
|
||||||
;; Package-Commit: da1566db41a68809ef7f91ebf2de28118067c89b
|
|
||||||
;; Version: 0.2.0
|
;; Version: 0.2.0
|
||||||
;; Package-Requires: ((company "0.8.0") (anaconda-mode "0.1.1") (cl-lib "0.5.0") (dash "2.6.0") (s "1.9"))
|
;; Package-Requires: ((emacs "25.1") (company "0.8.0") (anaconda-mode "0.1.1") (cl-lib "0.5.0") (dash "2.6.0") (s "1.9"))
|
||||||
|
;; Keywords: convenience company anaconda
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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
|
;; it under the terms of the GNU General Public License as published by
|
||||||
15
lisp/company-ledger/company-ledger-pkg.el
Normal file
15
lisp/company-ledger/company-ledger-pkg.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(define-package "company-ledger" "20210910.250" "Fuzzy auto-completion for Ledger & friends"
|
||||||
|
'((emacs "24.3")
|
||||||
|
(company "0.8.0"))
|
||||||
|
:commit "55fdddd6c5e9c061c685b474ef5e148a4ac9b576" :authors
|
||||||
|
'(("Debanjum Singh Solanky" . "debanjumATgmailDOTcom"))
|
||||||
|
:maintainers
|
||||||
|
'(("Debanjum Singh Solanky" . "debanjumATgmailDOTcom"))
|
||||||
|
:maintainer
|
||||||
|
'("Debanjum Singh Solanky" . "debanjumATgmailDOTcom")
|
||||||
|
:keywords
|
||||||
|
'("abbrev" "matching" "auto-complete" "beancount" "ledger" "company")
|
||||||
|
:url "https://github.com/debanjum/company-ledger")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -5,8 +5,6 @@
|
|||||||
;; Author: Debanjum Singh Solanky <debanjum AT gmail DOT com>
|
;; Author: Debanjum Singh Solanky <debanjum AT gmail DOT com>
|
||||||
;; Description: Fuzzy auto-completion for ledger & friends
|
;; Description: Fuzzy auto-completion for ledger & friends
|
||||||
;; Keywords: abbrev, matching, auto-complete, beancount, ledger, company
|
;; Keywords: abbrev, matching, auto-complete, beancount, ledger, company
|
||||||
;; Package-Version: 20210910.250
|
|
||||||
;; Package-Commit: 55fdddd6c5e9c061c685b474ef5e148a4ac9b576
|
|
||||||
;; Version: 0.1.0
|
;; Version: 0.1.0
|
||||||
;; Package-Requires: ((emacs "24.3") (company "0.8.0"))
|
;; Package-Requires: ((emacs "24.3") (company "0.8.0"))
|
||||||
;; URL: https://github.com/debanjum/company-ledger
|
;; URL: https://github.com/debanjum/company-ledger
|
||||||
16
lisp/company-quickhelp/company-quickhelp-pkg.el
Normal file
16
lisp/company-quickhelp/company-quickhelp-pkg.el
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
(define-package "company-quickhelp" "20231026.1714" "Popup documentation for completion candidates"
|
||||||
|
'((emacs "24.3")
|
||||||
|
(company "0.8.9")
|
||||||
|
(pos-tip "0.4.6"))
|
||||||
|
:commit "5bda859577582cc42d16fc0eaf5f7c8bedfd9e69" :authors
|
||||||
|
'(("Lars Andersen" . "expez@expez.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Lars Andersen" . "expez@expez.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Lars Andersen" . "expez@expez.com")
|
||||||
|
:keywords
|
||||||
|
'("company" "popup" "documentation" "quickhelp")
|
||||||
|
:url "https://www.github.com/expez/company-quickhelp")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
;; Author: Lars Andersen <expez@expez.com>
|
;; Author: Lars Andersen <expez@expez.com>
|
||||||
;; URL: https://www.github.com/expez/company-quickhelp
|
;; URL: https://www.github.com/expez/company-quickhelp
|
||||||
;; Package-Version: 20221212.534
|
|
||||||
;; Package-Commit: 9505fb09d064581da142d75c139d48b5cf695bd5
|
|
||||||
;; Keywords: company popup documentation quickhelp
|
;; Keywords: company popup documentation quickhelp
|
||||||
;; Version: 2.2.0
|
;; Version: 2.2.0
|
||||||
;; Package-Requires: ((emacs "24.3") (company "0.8.9") (pos-tip "0.4.6"))
|
;; Package-Requires: ((emacs "24.3") (company "0.8.9") (pos-tip "0.4.6"))
|
||||||
@@ -55,7 +53,7 @@
|
|||||||
"Delay, in seconds, before the quickhelp popup appears.
|
"Delay, in seconds, before the quickhelp popup appears.
|
||||||
|
|
||||||
If set to nil the popup won't automatically appear, but can still
|
If set to nil the popup won't automatically appear, but can still
|
||||||
be triggered manually using `company-quickhelp-show'."
|
be triggered manually using `company-quickhelp-manual-begin'."
|
||||||
:type '(choice (number :tag "Delay in seconds")
|
:type '(choice (number :tag "Delay in seconds")
|
||||||
(const :tag "Don't popup help automatically" nil))
|
(const :tag "Don't popup help automatically" nil))
|
||||||
:group 'company-quickhelp)
|
:group 'company-quickhelp)
|
||||||
@@ -235,7 +233,6 @@ currently active `company' completion candidate."
|
|||||||
(defun company-quickhelp-hide ()
|
(defun company-quickhelp-hide ()
|
||||||
(company-cancel))
|
(company-cancel))
|
||||||
|
|
||||||
|
|
||||||
(defun company-quickhelp-pos-tip-available-p ()
|
(defun company-quickhelp-pos-tip-available-p ()
|
||||||
"Return t if and only if pos-tip is expected work in the current frame."
|
"Return t if and only if pos-tip is expected work in the current frame."
|
||||||
(and
|
(and
|
||||||
15
lisp/company-statistics/company-statistics-pkg.el
Normal file
15
lisp/company-statistics/company-statistics-pkg.el
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
(define-package "company-statistics" "20170210.1933" "Sort candidates using completion history"
|
||||||
|
'((emacs "24.3")
|
||||||
|
(company "0.8.5"))
|
||||||
|
:commit "e62157d43b2c874d2edbd547c3bdfb05d0a7ae5c" :authors
|
||||||
|
'(("Ingo Lohmar" . "i.lohmar@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Ingo Lohmar" . "i.lohmar@gmail.com"))
|
||||||
|
:maintainer
|
||||||
|
'("Ingo Lohmar" . "i.lohmar@gmail.com")
|
||||||
|
:keywords
|
||||||
|
'("abbrev" "convenience" "matching")
|
||||||
|
:url "https://github.com/company-mode/company-statistics")
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
;; Author: Ingo Lohmar <i.lohmar@gmail.com>
|
;; Author: Ingo Lohmar <i.lohmar@gmail.com>
|
||||||
;; URL: https://github.com/company-mode/company-statistics
|
;; URL: https://github.com/company-mode/company-statistics
|
||||||
;; Package-Version: 20170210.1933
|
|
||||||
;; Package-Commit: e62157d43b2c874d2edbd547c3bdfb05d0a7ae5c
|
|
||||||
;; Version: 0.2.3
|
;; Version: 0.2.3
|
||||||
;; Keywords: abbrev, convenience, matching
|
;; Keywords: abbrev, convenience, matching
|
||||||
;; Package-Requires: ((emacs "24.3") (company "0.8.5"))
|
;; Package-Requires: ((emacs "24.3") (company "0.8.5"))
|
||||||
@@ -5,6 +5,8 @@
|
|||||||
(web-completion-data "0.1.0"))
|
(web-completion-data "0.1.0"))
|
||||||
:commit "e0c6bfa3ae7006c73d0fdfc0fdb69816309baf1b" :authors
|
:commit "e0c6bfa3ae7006c73d0fdfc0fdb69816309baf1b" :authors
|
||||||
'(("Olexandr Sydorchuk" . "olexandr.syd@gmail.com"))
|
'(("Olexandr Sydorchuk" . "olexandr.syd@gmail.com"))
|
||||||
|
:maintainers
|
||||||
|
'(("Olexandr Sydorchuk" . "olexandr.syd@gmail.com"))
|
||||||
:maintainer
|
:maintainer
|
||||||
'("Olexandr Sydorchuk" . "olexandr.syd@gmail.com")
|
'("Olexandr Sydorchuk" . "olexandr.syd@gmail.com")
|
||||||
:keywords
|
:keywords
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-capf.el --- company-mode completion-at-point-functions backend -*- lexical-binding: t -*-
|
;;; company-capf.el --- company-mode completion-at-point-functions backend -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
@@ -135,27 +135,10 @@ so we can't just use the preceding variable instead.")
|
|||||||
(`match
|
(`match
|
||||||
;; Ask the for the `:company-match' function. If that doesn't help,
|
;; Ask the for the `:company-match' function. If that doesn't help,
|
||||||
;; fallback to sniffing for face changes to get a suitable value.
|
;; fallback to sniffing for face changes to get a suitable value.
|
||||||
(let ((f (plist-get (nthcdr 4 company-capf--current-completion-data)
|
(let ((f (or (plist-get (nthcdr 4 company-capf--current-completion-data)
|
||||||
:company-match)))
|
:company-match)
|
||||||
(if f (funcall f arg)
|
#'company--match-from-capf-face)))
|
||||||
(let* ((match-start nil) (pos -1)
|
(funcall f arg)))
|
||||||
(prop-value nil) (faces nil)
|
|
||||||
(has-face-p nil) chunks
|
|
||||||
(limit (length arg)))
|
|
||||||
(while (< pos limit)
|
|
||||||
(setq pos
|
|
||||||
(if (< pos 0) 0 (next-property-change pos arg limit)))
|
|
||||||
(setq prop-value (or
|
|
||||||
(get-text-property pos 'face arg)
|
|
||||||
(get-text-property pos 'font-lock-face arg))
|
|
||||||
faces (if (listp prop-value) prop-value (list prop-value))
|
|
||||||
has-face-p (memq 'completions-common-part faces))
|
|
||||||
(cond ((and (not match-start) has-face-p)
|
|
||||||
(setq match-start pos))
|
|
||||||
((and match-start (not has-face-p))
|
|
||||||
(push (cons match-start pos) chunks)
|
|
||||||
(setq match-start nil))))
|
|
||||||
(nreverse chunks)))))
|
|
||||||
(`duplicates t)
|
(`duplicates t)
|
||||||
(`no-cache t) ;Not much can be done here, as long as we handle
|
(`no-cache t) ;Not much can be done here, as long as we handle
|
||||||
;non-prefix matches.
|
;non-prefix matches.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-clang.el --- company-mode completion backend for Clang -*- lexical-binding: t -*-
|
;;; company-clang.el --- company-mode completion backend for Clang -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2009-2011, 2013-2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2011, 2013-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
|
|
||||||
@@ -119,10 +119,9 @@ or automatically through a custom `company-clang-prefix-guesser'."
|
|||||||
|
|
||||||
;; parsing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;; parsing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;; TODO: Handle Pattern (syntactic hints would be neat).
|
|
||||||
;; Do we ever see OVERLOAD (or OVERRIDE)?
|
;; Do we ever see OVERLOAD (or OVERRIDE)?
|
||||||
(defconst company-clang--completion-pattern
|
(defconst company-clang--completion-pattern
|
||||||
"^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?:\\(?: (InBase)\\)? : \\(.*\\)$\\)?$")
|
"^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\|Pattern\\)\\(?:\\(?: (InBase)\\)? : \\(.*\\)$\\)?$")
|
||||||
|
|
||||||
(defconst company-clang--error-buffer-name "*clang-error*")
|
(defconst company-clang--error-buffer-name "*clang-error*")
|
||||||
|
|
||||||
@@ -138,14 +137,14 @@ or automatically through a custom `company-clang-prefix-guesser'."
|
|||||||
(regexp-quote prefix)))
|
(regexp-quote prefix)))
|
||||||
(case-fold-search nil)
|
(case-fold-search nil)
|
||||||
(results (make-hash-table :test 'equal :size (/ (point-max) 100)))
|
(results (make-hash-table :test 'equal :size (/ (point-max) 100)))
|
||||||
lines match)
|
lines)
|
||||||
(while (re-search-forward pattern nil t)
|
(while (re-search-forward pattern nil t)
|
||||||
(setq match (match-string-no-properties 1))
|
(let ((match (match-string-no-properties 1))
|
||||||
(unless (equal match "Pattern")
|
(meta (match-string-no-properties 2)))
|
||||||
(save-match-data
|
(when (equal match "Pattern")
|
||||||
|
(setq match (company-clang--pattern-to-match meta)))
|
||||||
(when (string-match ":" match)
|
(when (string-match ":" match)
|
||||||
(setq match (substring match 0 (match-beginning 0)))))
|
(setq match (substring match 0 (match-beginning 0))))
|
||||||
(let ((meta (match-string-no-properties 2)))
|
|
||||||
;; Avoiding duplicates:
|
;; Avoiding duplicates:
|
||||||
;; https://github.com/company-mode/company-mode/issues/841
|
;; https://github.com/company-mode/company-mode/issues/841
|
||||||
(cond
|
(cond
|
||||||
@@ -154,7 +153,7 @@ or automatically through a custom `company-clang-prefix-guesser'."
|
|||||||
(puthash match meta results))
|
(puthash match meta results))
|
||||||
;; Or it's the first time we see this completion
|
;; Or it's the first time we see this completion
|
||||||
((eq (gethash match results 'none) 'none)
|
((eq (gethash match results 'none) 'none)
|
||||||
(puthash match nil results))))))
|
(puthash match nil results)))))
|
||||||
(maphash
|
(maphash
|
||||||
(lambda (match meta)
|
(lambda (match meta)
|
||||||
(when meta
|
(when meta
|
||||||
@@ -163,6 +162,15 @@ or automatically through a custom `company-clang-prefix-guesser'."
|
|||||||
results)
|
results)
|
||||||
lines))
|
lines))
|
||||||
|
|
||||||
|
(defun company-clang--pattern-to-match (pat)
|
||||||
|
(let ((start 0)
|
||||||
|
(end nil))
|
||||||
|
(when (string-match "#]" pat)
|
||||||
|
(setq start (match-end 0)))
|
||||||
|
(when (string-match "[ \(]<#" pat start)
|
||||||
|
(setq end (match-beginning 0)))
|
||||||
|
(substring pat start end)))
|
||||||
|
|
||||||
(defun company-clang--meta (candidate)
|
(defun company-clang--meta (candidate)
|
||||||
(get-text-property 0 'meta candidate))
|
(get-text-property 0 'meta candidate))
|
||||||
|
|
||||||
@@ -178,6 +186,8 @@ or automatically through a custom `company-clang-prefix-guesser'."
|
|||||||
(delete-region pt (point)))
|
(delete-region pt (point)))
|
||||||
(buffer-string)))))
|
(buffer-string)))))
|
||||||
|
|
||||||
|
;; TODO: Parse the original formatting here, rather than guess.
|
||||||
|
;; Strip it every time in the `meta' handler instead.
|
||||||
(defun company-clang--annotation-1 (candidate)
|
(defun company-clang--annotation-1 (candidate)
|
||||||
(let ((meta (company-clang--meta candidate)))
|
(let ((meta (company-clang--meta candidate)))
|
||||||
(cond
|
(cond
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-dabbrev-code.el --- dabbrev-like company-mode backend for code -*- lexical-binding: t -*-
|
;;; company-dabbrev-code.el --- dabbrev-like company-mode backend for code -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2009-2011, 2013-2016, 2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2011, 2013-2016, 2021-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
|
|
||||||
@@ -69,11 +69,29 @@ also `company-dabbrev-code-time-limit'."
|
|||||||
"Non-nil to ignore case when collecting completion candidates."
|
"Non-nil to ignore case when collecting completion candidates."
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defcustom company-dabbrev-code-completion-styles nil
|
||||||
|
"Non-nil to use the completion styles for fuzzy matching."
|
||||||
|
:type '(choice (const :tag "Prefix matching only" nil)
|
||||||
|
(const :tag "Matching according to `completion-styles'" t)
|
||||||
|
(list :tag "Custom list of styles" symbol)))
|
||||||
|
|
||||||
(defun company-dabbrev-code--make-regexp (prefix)
|
(defun company-dabbrev-code--make-regexp (prefix)
|
||||||
(concat "\\_<" (if (equal prefix "")
|
(let ((prefix-re
|
||||||
"\\([a-zA-Z]\\|\\s_\\)"
|
(cond
|
||||||
|
((equal prefix "")
|
||||||
|
"\\([a-zA-Z]\\|\\s_\\)")
|
||||||
|
((not company-dabbrev-code-completion-styles)
|
||||||
(regexp-quote prefix))
|
(regexp-quote prefix))
|
||||||
"\\(\\sw\\|\\s_\\)*\\_>"))
|
(t
|
||||||
|
;; Use the cache at least after 2 chars. We could also cache
|
||||||
|
;; earlier, for users who set company-min-p-l to 1 or 0.
|
||||||
|
(let ((prefix (if (>= (length prefix) 2)
|
||||||
|
(substring prefix 0 2)
|
||||||
|
prefix)))
|
||||||
|
(mapconcat #'regexp-quote
|
||||||
|
(mapcar #'string prefix)
|
||||||
|
"\\(\\sw\\|\\s_\\)*"))))))
|
||||||
|
(concat "\\_<" prefix-re "\\(\\sw\\|\\s_\\)*\\_>")))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun company-dabbrev-code (command &optional arg &rest _ignored)
|
(defun company-dabbrev-code (command &optional arg &rest _ignored)
|
||||||
@@ -88,18 +106,46 @@ comments or strings."
|
|||||||
(or company-dabbrev-code-everywhere
|
(or company-dabbrev-code-everywhere
|
||||||
(not (company-in-string-or-comment)))
|
(not (company-in-string-or-comment)))
|
||||||
(or (company-grab-symbol) 'stop)))
|
(or (company-grab-symbol) 'stop)))
|
||||||
(candidates (let ((case-fold-search company-dabbrev-code-ignore-case))
|
(candidates
|
||||||
|
(let* ((case-fold-search company-dabbrev-code-ignore-case)
|
||||||
|
(regexp (company-dabbrev-code--make-regexp arg)))
|
||||||
|
(company-dabbrev-code--filter
|
||||||
|
arg
|
||||||
|
(company-cache-fetch
|
||||||
|
'dabbrev-code-candidates
|
||||||
|
(lambda ()
|
||||||
(company-dabbrev--search
|
(company-dabbrev--search
|
||||||
(company-dabbrev-code--make-regexp arg)
|
regexp
|
||||||
company-dabbrev-code-time-limit
|
company-dabbrev-code-time-limit
|
||||||
(pcase company-dabbrev-code-other-buffers
|
(pcase company-dabbrev-code-other-buffers
|
||||||
(`t (list major-mode))
|
(`t (list major-mode))
|
||||||
(`code company-dabbrev-code-modes)
|
(`code company-dabbrev-code-modes)
|
||||||
(`all `all))
|
(`all `all))
|
||||||
(not company-dabbrev-code-everywhere))))
|
(not company-dabbrev-code-everywhere)))
|
||||||
|
:expire t
|
||||||
|
:check-tag regexp))))
|
||||||
(kind 'text)
|
(kind 'text)
|
||||||
|
(no-cache t)
|
||||||
(ignore-case company-dabbrev-code-ignore-case)
|
(ignore-case company-dabbrev-code-ignore-case)
|
||||||
|
(match (when company-dabbrev-code-completion-styles
|
||||||
|
(company--match-from-capf-face arg)))
|
||||||
(duplicates t)))
|
(duplicates t)))
|
||||||
|
|
||||||
|
(defun company-dabbrev-code--filter (prefix table)
|
||||||
|
(let ((completion-ignore-case company-dabbrev-code-ignore-case)
|
||||||
|
(completion-styles (if (listp company-dabbrev-code-completion-styles)
|
||||||
|
company-dabbrev-code-completion-styles
|
||||||
|
completion-styles))
|
||||||
|
res)
|
||||||
|
(if (not company-dabbrev-code-completion-styles)
|
||||||
|
(all-completions prefix table)
|
||||||
|
(setq res (completion-all-completions
|
||||||
|
prefix
|
||||||
|
table
|
||||||
|
nil (length prefix)))
|
||||||
|
(if (numberp (cdr (last res)))
|
||||||
|
(setcdr (last res) nil))
|
||||||
|
res)))
|
||||||
|
|
||||||
(provide 'company-dabbrev-code)
|
(provide 'company-dabbrev-code)
|
||||||
;;; company-dabbrev-code.el ends here
|
;;; company-dabbrev-code.el ends here
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-dabbrev.el --- dabbrev-like company-mode completion backend -*- lexical-binding: t -*-
|
;;; company-dabbrev.el --- dabbrev-like company-mode completion backend -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2009-2011, 2013-2018, 2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2011, 2013-2018, 2021-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
|
|
||||||
@@ -70,10 +70,7 @@ candidate is inserted, even some of its characters have different case."
|
|||||||
|
|
||||||
The value of nil means keep them as-is.
|
The value of nil means keep them as-is.
|
||||||
`case-replace' means use the value of `case-replace'.
|
`case-replace' means use the value of `case-replace'.
|
||||||
Any other value means downcase.
|
Any other value means downcase."
|
||||||
|
|
||||||
If you set this value to nil, you may also want to set
|
|
||||||
`company-dabbrev-ignore-case' to any value other than `keep-prefix'."
|
|
||||||
:type '(choice
|
:type '(choice
|
||||||
(const :tag "Keep as-is" nil)
|
(const :tag "Keep as-is" nil)
|
||||||
(const :tag "Downcase" t)
|
(const :tag "Downcase" t)
|
||||||
@@ -114,7 +111,7 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'."
|
|||||||
(when (and (>= (length match) company-dabbrev-minimum-length)
|
(when (and (>= (length match) company-dabbrev-minimum-length)
|
||||||
(not (and company-dabbrev-ignore-invisible
|
(not (and company-dabbrev-ignore-invisible
|
||||||
(invisible-p (match-beginning 0)))))
|
(invisible-p (match-beginning 0)))))
|
||||||
(push match symbols)))))
|
(puthash match t symbols)))))
|
||||||
(goto-char (if pos (1- pos) (point-min)))
|
(goto-char (if pos (1- pos) (point-min)))
|
||||||
;; Search before pos.
|
;; Search before pos.
|
||||||
(let ((tmp-end (point)))
|
(let ((tmp-end (point)))
|
||||||
@@ -147,7 +144,9 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'."
|
|||||||
(defun company-dabbrev--search (regexp &optional limit other-buffer-modes
|
(defun company-dabbrev--search (regexp &optional limit other-buffer-modes
|
||||||
ignore-comments)
|
ignore-comments)
|
||||||
(let* ((start (current-time))
|
(let* ((start (current-time))
|
||||||
(symbols (company-dabbrev--search-buffer regexp (point) nil start limit
|
(symbols (company-dabbrev--search-buffer regexp (point)
|
||||||
|
(make-hash-table :test 'equal)
|
||||||
|
start limit
|
||||||
ignore-comments)))
|
ignore-comments)))
|
||||||
(when other-buffer-modes
|
(when other-buffer-modes
|
||||||
(cl-dolist (buffer (delq (current-buffer) (buffer-list)))
|
(cl-dolist (buffer (delq (current-buffer) (buffer-list)))
|
||||||
@@ -175,8 +174,28 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'."
|
|||||||
1)))
|
1)))
|
||||||
|
|
||||||
(defun company-dabbrev--filter (prefix candidates)
|
(defun company-dabbrev--filter (prefix candidates)
|
||||||
(let ((completion-ignore-case company-dabbrev-ignore-case))
|
(let* ((completion-ignore-case company-dabbrev-ignore-case)
|
||||||
(all-completions prefix candidates)))
|
(filtered (all-completions prefix candidates))
|
||||||
|
(lp (length prefix))
|
||||||
|
(downcase (if (eq company-dabbrev-downcase 'case-replace)
|
||||||
|
case-replace
|
||||||
|
company-dabbrev-downcase)))
|
||||||
|
(when downcase
|
||||||
|
(let ((ptr filtered))
|
||||||
|
(while ptr
|
||||||
|
(setcar ptr (downcase (car ptr)))
|
||||||
|
(setq ptr (cdr ptr)))))
|
||||||
|
(if (and (eq company-dabbrev-ignore-case 'keep-prefix)
|
||||||
|
(not (= lp 0)))
|
||||||
|
(company-substitute-prefix prefix filtered)
|
||||||
|
filtered)))
|
||||||
|
|
||||||
|
(defun company-dabbrev--fetch ()
|
||||||
|
(company-dabbrev--search (company-dabbrev--make-regexp)
|
||||||
|
company-dabbrev-time-limit
|
||||||
|
(pcase company-dabbrev-other-buffers
|
||||||
|
(`t (list major-mode))
|
||||||
|
(`all `all))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun company-dabbrev (command &optional arg &rest _ignored)
|
(defun company-dabbrev (command &optional arg &rest _ignored)
|
||||||
@@ -186,21 +205,13 @@ This variable affects both `company-dabbrev' and `company-dabbrev-code'."
|
|||||||
(interactive (company-begin-backend 'company-dabbrev))
|
(interactive (company-begin-backend 'company-dabbrev))
|
||||||
(prefix (company-dabbrev--prefix))
|
(prefix (company-dabbrev--prefix))
|
||||||
(candidates
|
(candidates
|
||||||
(let* ((case-fold-search company-dabbrev-ignore-case)
|
(company-dabbrev--filter
|
||||||
(words (company-dabbrev--search (company-dabbrev--make-regexp)
|
arg
|
||||||
company-dabbrev-time-limit
|
(company-cache-fetch 'dabbrev-candidates #'company-dabbrev--fetch
|
||||||
(pcase company-dabbrev-other-buffers
|
:expire t)))
|
||||||
(`t (list major-mode))
|
|
||||||
(`all `all))))
|
|
||||||
(downcase-p (if (eq company-dabbrev-downcase 'case-replace)
|
|
||||||
case-replace
|
|
||||||
company-dabbrev-downcase)))
|
|
||||||
(setq words (company-dabbrev--filter arg words))
|
|
||||||
(if downcase-p
|
|
||||||
(mapcar 'downcase words)
|
|
||||||
words)))
|
|
||||||
(kind 'text)
|
(kind 'text)
|
||||||
(ignore-case company-dabbrev-ignore-case)
|
(no-cache t)
|
||||||
|
(ignore-case (and company-dabbrev-ignore-case t))
|
||||||
(duplicates t)))
|
(duplicates t)))
|
||||||
|
|
||||||
(provide 'company-dabbrev)
|
(provide 'company-dabbrev)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-ispell.el --- company-mode completion backend using Ispell
|
;;; company-ispell.el --- company-mode completion backend using Ispell
|
||||||
|
|
||||||
;; Copyright (C) 2009-2011, 2013-2016, 2018, 2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2011, 2013-2016, 2018, 2021, 2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
|
|
||||||
@@ -33,30 +33,35 @@
|
|||||||
"Completion backend using Ispell."
|
"Completion backend using Ispell."
|
||||||
:group 'company)
|
:group 'company)
|
||||||
|
|
||||||
|
(defun company--set-dictionary (symbol value)
|
||||||
|
(set-default-toplevel-value symbol value)
|
||||||
|
(company-cache-delete 'ispell-candidates))
|
||||||
|
|
||||||
(defcustom company-ispell-dictionary nil
|
(defcustom company-ispell-dictionary nil
|
||||||
"Dictionary to use for `company-ispell'.
|
"Dictionary to use for `company-ispell'.
|
||||||
If nil, use `ispell-complete-word-dict'."
|
If nil, use `ispell-complete-word-dict'."
|
||||||
:type '(choice (const :tag "default (nil)" nil)
|
:type '(choice (const :tag "default (nil)" nil)
|
||||||
(file :tag "dictionary" t)))
|
(file :tag "dictionary" t))
|
||||||
|
:set #'company--set-dictionary)
|
||||||
|
|
||||||
(defvar company-ispell-available 'unknown)
|
(defvar company-ispell-available 'unknown)
|
||||||
|
|
||||||
(defalias 'company-ispell--lookup-words
|
|
||||||
(if (fboundp 'ispell-lookup-words)
|
|
||||||
'ispell-lookup-words
|
|
||||||
'lookup-words))
|
|
||||||
|
|
||||||
(defun company-ispell-available ()
|
(defun company-ispell-available ()
|
||||||
(when (eq company-ispell-available 'unknown)
|
(when (eq company-ispell-available 'unknown)
|
||||||
(condition-case err
|
(condition-case err
|
||||||
(progn
|
(progn
|
||||||
(company-ispell--lookup-words "WHATEVER")
|
(ispell-lookup-words "WHATEVER")
|
||||||
(setq company-ispell-available t))
|
(setq company-ispell-available t))
|
||||||
(error
|
(error
|
||||||
(message "Company-Ispell: %s" (error-message-string err))
|
(message "Company-Ispell: %s" (error-message-string err))
|
||||||
(setq company-ispell-available nil))))
|
(setq company-ispell-available nil))))
|
||||||
company-ispell-available)
|
company-ispell-available)
|
||||||
|
|
||||||
|
(defun company--ispell-dict ()
|
||||||
|
(or company-ispell-dictionary
|
||||||
|
ispell-complete-word-dict
|
||||||
|
ispell-alternate-dictionary))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun company-ispell (command &optional arg &rest ignored)
|
(defun company-ispell (command &optional arg &rest ignored)
|
||||||
"`company-mode' completion backend using Ispell."
|
"`company-mode' completion backend using Ispell."
|
||||||
@@ -66,18 +71,23 @@ If nil, use `ispell-complete-word-dict'."
|
|||||||
(prefix (when (company-ispell-available)
|
(prefix (when (company-ispell-available)
|
||||||
(company-grab-word)))
|
(company-grab-word)))
|
||||||
(candidates
|
(candidates
|
||||||
(let ((words (company-ispell--lookup-words
|
(let* ((dict (company--ispell-dict))
|
||||||
arg
|
(all-words
|
||||||
(or company-ispell-dictionary ispell-complete-word-dict)))
|
(company-cache-fetch 'ispell-candidates
|
||||||
|
(lambda () (ispell-lookup-words "" dict))
|
||||||
|
:check-tag dict))
|
||||||
(completion-ignore-case t))
|
(completion-ignore-case t))
|
||||||
(if (string= arg "")
|
(if (string= arg "")
|
||||||
;; Small optimization.
|
;; Small optimization.
|
||||||
words
|
all-words
|
||||||
|
(company-substitute-prefix
|
||||||
|
arg
|
||||||
;; Work around issue #284.
|
;; Work around issue #284.
|
||||||
(all-completions arg words))))
|
(all-completions arg all-words)))))
|
||||||
(kind 'text)
|
(kind 'text)
|
||||||
|
(no-cache t)
|
||||||
(sorted t)
|
(sorted t)
|
||||||
(ignore-case 'keep-prefix)))
|
(ignore-case t)))
|
||||||
|
|
||||||
(provide 'company-ispell)
|
(provide 'company-ispell)
|
||||||
;;; company-ispell.el ends here
|
;;; company-ispell.el ends here
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-keywords.el --- A company backend for programming language keywords
|
;;; company-keywords.el --- A company backend for programming language keywords
|
||||||
|
|
||||||
;; Copyright (C) 2009-2011, 2013-2018, 2020-2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2011, 2013-2018, 2020-2022 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
(define-package "company" "20221206.2122" "Modular text completion framework"
|
(define-package "company" "20231023.1033" "Modular text completion framework"
|
||||||
'((emacs "25.1"))
|
'((emacs "25.1"))
|
||||||
:commit "6884e3ad717419b4a64a5fab08c8cb9bd20a0b27" :maintainer
|
:commit "66201465a962ac003f320a1df612641b2b276ab5" :maintainers
|
||||||
'("Dmitry Gutov" . "dgutov@yandex.ru")
|
'(("Dmitry Gutov" . "dmitry@gutov.dev"))
|
||||||
|
:maintainer
|
||||||
|
'("Dmitry Gutov" . "dmitry@gutov.dev")
|
||||||
:keywords
|
:keywords
|
||||||
'("abbrev" "convenience" "matching")
|
'("abbrev" "convenience" "matching")
|
||||||
:url "http://company-mode.github.io/")
|
:url "http://company-mode.github.io/")
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
(interactive (company-begin-backend 'company-tempo))
|
(interactive (company-begin-backend 'company-tempo))
|
||||||
(prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
|
(prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
|
||||||
(candidates (all-completions arg (tempo-build-collection)))
|
(candidates (all-completions arg (tempo-build-collection)))
|
||||||
|
(kind 'snippet)
|
||||||
(meta (company-tempo-meta arg))
|
(meta (company-tempo-meta arg))
|
||||||
(post-completion (when company-tempo-expand (company-tempo-insert arg)))
|
(post-completion (when company-tempo-expand (company-tempo-insert arg)))
|
||||||
(sorted t)))
|
(sorted t)))
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ confirm the selection and finish the completion."
|
|||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-obsolete-function-alias 'company-tng-configure-default 'company-tng-mode "0.9.14"
|
(define-obsolete-function-alias 'company-tng-configure-default 'company-tng-mode "0.10.0"
|
||||||
"Applies the default configuration to enable company-tng.")
|
"Applies the default configuration to enable company-tng.")
|
||||||
|
|
||||||
(declare-function eglot--snippet-expansion-fn "eglot")
|
(declare-function eglot--snippet-expansion-fn "eglot")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
;;; company-yasnippet.el --- company-mode completion backend for Yasnippet
|
;;; company-yasnippet.el --- company-mode completion backend for Yasnippet
|
||||||
|
|
||||||
;; Copyright (C) 2014-2015, 2020-2021 Free Software Foundation, Inc.
|
;; Copyright (C) 2014-2015, 2020-2022 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Dmitry Gutov
|
;; Author: Dmitry Gutov
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
;;; company.el --- Modular text completion framework -*- lexical-binding: t -*-
|
;;; company.el --- Modular text completion framework -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2009-2022 Free Software Foundation, Inc.
|
;; Copyright (C) 2009-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Nikolaj Schumacher
|
;; Author: Nikolaj Schumacher
|
||||||
;; Maintainer: Dmitry Gutov <dgutov@yandex.ru>
|
;; Maintainer: Dmitry Gutov <dmitry@gutov.dev>
|
||||||
;; URL: http://company-mode.github.io/
|
;; URL: http://company-mode.github.io/
|
||||||
;; Version: 0.9.13
|
;; Version: 0.10.2
|
||||||
;; Keywords: abbrev, convenience, matching
|
;; Keywords: abbrev, convenience, matching
|
||||||
;; Package-Requires: ((emacs "25.1"))
|
;; Package-Requires: ((emacs "25.1"))
|
||||||
|
|
||||||
@@ -134,17 +134,17 @@
|
|||||||
(defface company-tooltip-quick-access
|
(defface company-tooltip-quick-access
|
||||||
'((default :inherit company-tooltip-annotation))
|
'((default :inherit company-tooltip-annotation))
|
||||||
"Face used for the quick-access hints shown in the tooltip."
|
"Face used for the quick-access hints shown in the tooltip."
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(defface company-tooltip-quick-access-selection
|
(defface company-tooltip-quick-access-selection
|
||||||
'((default :inherit company-tooltip-annotation-selection))
|
'((default :inherit company-tooltip-annotation-selection))
|
||||||
"Face used for the selected quick-access hints shown in the tooltip."
|
"Face used for the selected quick-access hints shown in the tooltip."
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(define-obsolete-face-alias
|
(define-obsolete-face-alias
|
||||||
'company-scrollbar-fg
|
'company-scrollbar-fg
|
||||||
'company-tooltip-scrollbar-thumb
|
'company-tooltip-scrollbar-thumb
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defface company-tooltip-scrollbar-thumb
|
(defface company-tooltip-scrollbar-thumb
|
||||||
'((((background light))
|
'((((background light))
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
(define-obsolete-face-alias
|
(define-obsolete-face-alias
|
||||||
'company-scrollbar-bg
|
'company-scrollbar-bg
|
||||||
'company-tooltip-scrollbar-track
|
'company-tooltip-scrollbar-track
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defface company-tooltip-scrollbar-track
|
(defface company-tooltip-scrollbar-track
|
||||||
'((((background light))
|
'((((background light))
|
||||||
@@ -286,7 +286,7 @@ This doesn't include the margins and the scroll bar."
|
|||||||
(defcustom company-tooltip-width-grow-only nil
|
(defcustom company-tooltip-width-grow-only nil
|
||||||
"When non-nil, the tooltip width is not allowed to decrease."
|
"When non-nil, the tooltip width is not allowed to decrease."
|
||||||
:type 'boolean
|
:type 'boolean
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(defcustom company-tooltip-margin 1
|
(defcustom company-tooltip-margin 1
|
||||||
"Width of margin columns to show around the toolip."
|
"Width of margin columns to show around the toolip."
|
||||||
@@ -309,6 +309,16 @@ This doesn't include the margins and the scroll bar."
|
|||||||
:type 'boolean
|
:type 'boolean
|
||||||
:package-version '(company . "0.8.1"))
|
:package-version '(company . "0.8.1"))
|
||||||
|
|
||||||
|
(defcustom company-tooltip-annotation-padding nil
|
||||||
|
"Non-nil to specify the padding before annotation.
|
||||||
|
|
||||||
|
Depending on the value of `company-tooltip-align-annotations', the default
|
||||||
|
padding is either 0 or 1 space. This variable allows to override that
|
||||||
|
value to increase the padding. When annotations are right-aligned, it sets
|
||||||
|
the minimum padding, and otherwise just the constant one."
|
||||||
|
:type 'number
|
||||||
|
:package-version '(company "0.10.0"))
|
||||||
|
|
||||||
(defvar company-safe-backends
|
(defvar company-safe-backends
|
||||||
'((company-abbrev . "Abbrev")
|
'((company-abbrev . "Abbrev")
|
||||||
(company-bbdb . "BBDB")
|
(company-bbdb . "BBDB")
|
||||||
@@ -577,12 +587,12 @@ this."
|
|||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'company-auto-complete
|
'company-auto-complete
|
||||||
'company-insertion-on-trigger
|
'company-insertion-on-trigger
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'company-auto-commit
|
'company-auto-commit
|
||||||
'company-insertion-on-trigger
|
'company-insertion-on-trigger
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defcustom company-insertion-on-trigger nil
|
(defcustom company-insertion-on-trigger nil
|
||||||
"If enabled, allow triggering insertion of the selected candidate.
|
"If enabled, allow triggering insertion of the selected candidate.
|
||||||
@@ -596,17 +606,17 @@ triggers."
|
|||||||
(const :tag "On, if user interaction took place"
|
(const :tag "On, if user interaction took place"
|
||||||
company-explicit-action-p)
|
company-explicit-action-p)
|
||||||
(const :tag "On" t))
|
(const :tag "On" t))
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'company-auto-complete-chars
|
'company-auto-complete-chars
|
||||||
'company-insertion-triggers
|
'company-insertion-triggers
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'company-auto-commit-chars
|
'company-auto-commit-chars
|
||||||
'company-insertion-triggers
|
'company-insertion-triggers
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defcustom company-insertion-triggers '(?\ ?\) ?.)
|
(defcustom company-insertion-triggers '(?\ ?\) ?.)
|
||||||
"Determine triggers for `company-insertion-on-trigger'.
|
"Determine triggers for `company-insertion-on-trigger'.
|
||||||
@@ -638,7 +648,7 @@ insertion."
|
|||||||
(const :tag "Generic string fence." ?|)
|
(const :tag "Generic string fence." ?|)
|
||||||
(const :tag "Generic comment fence." ?!))
|
(const :tag "Generic comment fence." ?!))
|
||||||
(function :tag "Predicate function"))
|
(function :tag "Predicate function"))
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(defcustom company-idle-delay .2
|
(defcustom company-idle-delay .2
|
||||||
"The idle delay in seconds until completion starts automatically.
|
"The idle delay in seconds until completion starts automatically.
|
||||||
@@ -692,15 +702,18 @@ commands in the `company-' namespace, abort completion."
|
|||||||
|
|
||||||
(defun company-custom--set-quick-access (option value)
|
(defun company-custom--set-quick-access (option value)
|
||||||
"Re-bind quick-access key sequences on OPTION VALUE change."
|
"Re-bind quick-access key sequences on OPTION VALUE change."
|
||||||
|
;; When upgrading from an earlier version of company, might not be.
|
||||||
|
(when (fboundp #'company-keymap--unbind-quick-access)
|
||||||
(when (boundp 'company-active-map)
|
(when (boundp 'company-active-map)
|
||||||
(company-keymap--unbind-quick-access company-active-map))
|
(company-keymap--unbind-quick-access company-active-map))
|
||||||
(when (boundp 'company-search-map)
|
(when (boundp 'company-search-map)
|
||||||
(company-keymap--unbind-quick-access company-search-map))
|
(company-keymap--unbind-quick-access company-search-map)))
|
||||||
(custom-set-default option value)
|
(custom-set-default option value)
|
||||||
|
(when (fboundp #'company-keymap--bind-quick-access)
|
||||||
(when (boundp 'company-active-map)
|
(when (boundp 'company-active-map)
|
||||||
(company-keymap--bind-quick-access company-active-map))
|
(company-keymap--bind-quick-access company-active-map))
|
||||||
(when (boundp 'company-search-map)
|
(when (boundp 'company-search-map)
|
||||||
(company-keymap--bind-quick-access company-search-map)))
|
(company-keymap--bind-quick-access company-search-map))))
|
||||||
|
|
||||||
(defcustom company-quick-access-keys '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0")
|
(defcustom company-quick-access-keys '("1" "2" "3" "4" "5" "6" "7" "8" "9" "0")
|
||||||
"Character strings used as a part of quick-access key sequences.
|
"Character strings used as a part of quick-access key sequences.
|
||||||
@@ -718,7 +731,7 @@ beside the candidates."
|
|||||||
;; TODO un-comment on removal of `M-n' `company--select-next-and-warn'.
|
;; TODO un-comment on removal of `M-n' `company--select-next-and-warn'.
|
||||||
;; (const :tag "Dvorak home row" ("a" "o" "e" "u" "i" "d" "h" "t" "n" "s"))
|
;; (const :tag "Dvorak home row" ("a" "o" "e" "u" "i" "d" "h" "t" "n" "s"))
|
||||||
(repeat :tag "User defined" string))
|
(repeat :tag "User defined" string))
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(defcustom company-quick-access-modifier 'meta
|
(defcustom company-quick-access-modifier 'meta
|
||||||
"Modifier key used for quick-access keys sequences.
|
"Modifier key used for quick-access keys sequences.
|
||||||
@@ -729,7 +742,7 @@ See `company-quick-access-keys' for more details."
|
|||||||
(const :tag "Super key" super)
|
(const :tag "Super key" super)
|
||||||
(const :tag "Hyper key" hyper)
|
(const :tag "Hyper key" hyper)
|
||||||
(const :tag "Control key" control))
|
(const :tag "Control key" control))
|
||||||
:package-version '(company . "0.9.14"))
|
:package-version '(company . "0.10.0"))
|
||||||
|
|
||||||
(defun company-keymap--quick-access-modifier ()
|
(defun company-keymap--quick-access-modifier ()
|
||||||
"Return string representation of the `company-quick-access-modifier'."
|
"Return string representation of the `company-quick-access-modifier'."
|
||||||
@@ -764,7 +777,7 @@ See `company-quick-access-keys' for more details."
|
|||||||
(define-obsolete-variable-alias
|
(define-obsolete-variable-alias
|
||||||
'company-show-numbers
|
'company-show-numbers
|
||||||
'company-show-quick-access
|
'company-show-quick-access
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defcustom company-show-quick-access nil
|
(defcustom company-show-quick-access nil
|
||||||
"If non-nil, show quick-access hints beside the candidates.
|
"If non-nil, show quick-access hints beside the candidates.
|
||||||
@@ -791,7 +804,7 @@ return a string prefixed with one space."
|
|||||||
'company-show-numbers-function
|
'company-show-numbers-function
|
||||||
"use `company-quick-access-hint-function' instead,
|
"use `company-quick-access-hint-function' instead,
|
||||||
but adjust the expected values appropriately."
|
but adjust the expected values appropriately."
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defcustom company-quick-access-hint-function #'company-quick-access-hint-key
|
(defcustom company-quick-access-hint-function #'company-quick-access-hint-key
|
||||||
"Function called to get quick-access hints for the candidates.
|
"Function called to get quick-access hints for the candidates.
|
||||||
@@ -1031,10 +1044,10 @@ means that `company-mode' is always turned on except in `message-mode' buffers."
|
|||||||
(defun company-install-map ()
|
(defun company-install-map ()
|
||||||
(unless (or (cdar company-emulation-alist)
|
(unless (or (cdar company-emulation-alist)
|
||||||
(null company-my-keymap))
|
(null company-my-keymap))
|
||||||
(setf (cdar company-emulation-alist) company-my-keymap)))
|
(setq-local company-emulation-alist `((t . ,company-my-keymap)))))
|
||||||
|
|
||||||
(defun company-uninstall-map ()
|
(defun company-uninstall-map ()
|
||||||
(setf (cdar company-emulation-alist) nil))
|
(kill-local-variable 'company-emulation-alist))
|
||||||
|
|
||||||
(defun company--company-command-p (keys)
|
(defun company--company-command-p (keys)
|
||||||
"Checks if the keys are part of company's overriding keymap"
|
"Checks if the keys are part of company's overriding keymap"
|
||||||
@@ -1051,6 +1064,10 @@ means that `company-mode' is always turned on except in `message-mode' buffers."
|
|||||||
(row (cdr (or (posn-actual-col-row posn)
|
(row (cdr (or (posn-actual-col-row posn)
|
||||||
;; When position is non-visible for some reason.
|
;; When position is non-visible for some reason.
|
||||||
(posn-col-row posn)))))
|
(posn-col-row posn)))))
|
||||||
|
;; posn-col-row return value relative to the left
|
||||||
|
(when (eq (current-bidi-paragraph-direction) 'right-to-left)
|
||||||
|
(let ((ww (window-body-width)))
|
||||||
|
(setq col (- ww col))))
|
||||||
(when (bound-and-true-p display-line-numbers)
|
(when (bound-and-true-p display-line-numbers)
|
||||||
(cl-decf col (+ 2 (line-number-display-width))))
|
(cl-decf col (+ 2 (line-number-display-width))))
|
||||||
(cons (+ col (window-hscroll)) row)))
|
(cons (+ col (window-hscroll)) row)))
|
||||||
@@ -1116,6 +1133,69 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
|
|||||||
(car (setq ppss (cdr ppss)))
|
(car (setq ppss (cdr ppss)))
|
||||||
(nth 3 ppss))))
|
(nth 3 ppss))))
|
||||||
|
|
||||||
|
(defun company-substitute-prefix (prefix strings)
|
||||||
|
(let ((len (length prefix)))
|
||||||
|
(mapcar
|
||||||
|
(lambda (s)
|
||||||
|
(if (eq t (compare-strings prefix 0 len s 0 len))
|
||||||
|
s
|
||||||
|
(concat prefix (substring s len))))
|
||||||
|
strings)))
|
||||||
|
|
||||||
|
(defun company--match-from-capf-face (str)
|
||||||
|
"Compute `match' result from a CAPF's completion fontification."
|
||||||
|
(let* ((match-start nil) (pos -1)
|
||||||
|
(prop-value nil) (faces nil)
|
||||||
|
(has-face-p nil) chunks
|
||||||
|
(limit (length str)))
|
||||||
|
(while (< pos limit)
|
||||||
|
(setq pos
|
||||||
|
(if (< pos 0) 0 (next-property-change pos str limit)))
|
||||||
|
(setq prop-value (or (get-text-property pos 'face str)
|
||||||
|
(get-text-property pos 'font-lock-face str))
|
||||||
|
faces (if (listp prop-value) prop-value (list prop-value))
|
||||||
|
has-face-p (memq 'completions-common-part faces))
|
||||||
|
(cond ((and (not match-start) has-face-p)
|
||||||
|
(setq match-start pos))
|
||||||
|
((and match-start (not has-face-p))
|
||||||
|
(push (cons match-start pos) chunks)
|
||||||
|
(setq match-start nil))))
|
||||||
|
(nreverse chunks)))
|
||||||
|
|
||||||
|
(defvar company--cache (make-hash-table :test #'equal :size 10))
|
||||||
|
|
||||||
|
(cl-defun company-cache-fetch (key
|
||||||
|
fetcher
|
||||||
|
&key expire check-tag)
|
||||||
|
"Fetch the value assigned to KEY in the cache.
|
||||||
|
When not found, or when found to be stale, calls FETCHER to compute the
|
||||||
|
result. When EXPIRE is non-nil, the value will be deleted at the end of
|
||||||
|
completion. CHECK-TAG, when present, is saved as well, and the entry will
|
||||||
|
be recomputed when this value changes."
|
||||||
|
;; We could make EXPIRE accept a time value as well.
|
||||||
|
(let ((res (gethash key company--cache 'none))
|
||||||
|
value)
|
||||||
|
(if (and (not (eq res 'none))
|
||||||
|
(or (not check-tag)
|
||||||
|
(equal check-tag (assoc-default :check-tag res))))
|
||||||
|
(assoc-default :value res)
|
||||||
|
(setq res (list (cons :value (setq value (funcall fetcher)))))
|
||||||
|
(if expire (push '(:expire . t) res))
|
||||||
|
(if check-tag (push `(:check-tag . ,check-tag) res))
|
||||||
|
(puthash key res company--cache)
|
||||||
|
value)))
|
||||||
|
|
||||||
|
(defun company-cache-delete (key)
|
||||||
|
"Delete KEY from cache."
|
||||||
|
(remhash key company--cache))
|
||||||
|
|
||||||
|
(defun company-cache-expire ()
|
||||||
|
"Delete all keys from the cache that are set to be expired."
|
||||||
|
(maphash (lambda (k v)
|
||||||
|
(when (assoc-default :expire v)
|
||||||
|
(remhash k company--cache)))
|
||||||
|
company--cache))
|
||||||
|
|
||||||
(defun company-call-backend (&rest args)
|
(defun company-call-backend (&rest args)
|
||||||
(company--force-sync #'company-call-backend-raw args company-backend))
|
(company--force-sync #'company-call-backend-raw args company-backend))
|
||||||
|
|
||||||
@@ -1151,6 +1231,9 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
|
|||||||
(error (error "Company: backend %s error \"%s\" with args %s"
|
(error (error "Company: backend %s error \"%s\" with args %s"
|
||||||
company-backend (error-message-string err) args))))
|
company-backend (error-message-string err) args))))
|
||||||
|
|
||||||
|
(defvar-local company--multi-uncached-backends nil)
|
||||||
|
(defvar-local company--multi-min-prefix nil)
|
||||||
|
|
||||||
(defun company--multi-backend-adapter (backends command &rest args)
|
(defun company--multi-backend-adapter (backends command &rest args)
|
||||||
(let ((backends (cl-loop for b in backends
|
(let ((backends (cl-loop for b in backends
|
||||||
when (or (keywordp b)
|
when (or (keywordp b)
|
||||||
@@ -1165,9 +1248,30 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
|
|||||||
|
|
||||||
(pcase command
|
(pcase command
|
||||||
(`candidates
|
(`candidates
|
||||||
(company--multi-backend-adapter-candidates backends (car args) separate))
|
(company--multi-backend-adapter-candidates backends
|
||||||
|
(car args)
|
||||||
|
(or company--multi-min-prefix 0)
|
||||||
|
separate))
|
||||||
|
(`set-min-prefix (setq company--multi-min-prefix (car args)))
|
||||||
(`sorted separate)
|
(`sorted separate)
|
||||||
(`duplicates (not separate))
|
(`duplicates (not separate))
|
||||||
|
((and `no-cache
|
||||||
|
(pred (lambda (_)
|
||||||
|
(let* (found
|
||||||
|
(uncached company--multi-uncached-backends))
|
||||||
|
(dolist (backend backends)
|
||||||
|
(when
|
||||||
|
(and (member backend uncached)
|
||||||
|
(company--good-prefix-p
|
||||||
|
(let ((company-backend backend))
|
||||||
|
(company-call-backend 'prefix))
|
||||||
|
(or company--multi-min-prefix 0)))
|
||||||
|
(setq found t
|
||||||
|
company--multi-uncached-backends
|
||||||
|
(delete backend
|
||||||
|
company--multi-uncached-backends))))
|
||||||
|
found))))
|
||||||
|
t)
|
||||||
((or `prefix `ignore-case `no-cache `require-match)
|
((or `prefix `ignore-case `no-cache `require-match)
|
||||||
(let (value)
|
(let (value)
|
||||||
(cl-dolist (backend backends)
|
(cl-dolist (backend backends)
|
||||||
@@ -1184,12 +1288,18 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
|
|||||||
(car backends))))
|
(car backends))))
|
||||||
(apply backend command args))))))))
|
(apply backend command args))))))))
|
||||||
|
|
||||||
(defun company--multi-backend-adapter-candidates (backends prefix separate)
|
(defun company--multi-backend-adapter-candidates (backends prefix min-length separate)
|
||||||
(let ((pairs (cl-loop for backend in backends
|
(let ((pairs (cl-loop for backend in backends
|
||||||
when (equal (company--prefix-str
|
when (let ((bp (let ((company-backend backend))
|
||||||
(let ((company-backend backend))
|
(company-call-backend 'prefix))))
|
||||||
(company-call-backend 'prefix)))
|
(and
|
||||||
prefix)
|
;; It's important that the lengths match.
|
||||||
|
(equal (company--prefix-str bp) prefix)
|
||||||
|
;; One might override min-length, another not.
|
||||||
|
(if (company--good-prefix-p bp min-length)
|
||||||
|
t
|
||||||
|
(push backend company--multi-uncached-backends)
|
||||||
|
nil)))
|
||||||
collect (cons (funcall backend 'candidates prefix)
|
collect (cons (funcall backend 'candidates prefix)
|
||||||
(company--multi-candidates-mapper
|
(company--multi-candidates-mapper
|
||||||
backend
|
backend
|
||||||
@@ -1346,9 +1456,6 @@ To toggle the value of this variable, call `company-show-doc-buffer' with a
|
|||||||
prefix argument.")
|
prefix argument.")
|
||||||
|
|
||||||
(defun company-call-frontends (command)
|
(defun company-call-frontends (command)
|
||||||
(when (and company-auto-update-doc
|
|
||||||
(memq command '(update show)))
|
|
||||||
(company-show-doc-buffer))
|
|
||||||
(cl-loop for frontend in company-frontends collect
|
(cl-loop for frontend in company-frontends collect
|
||||||
(condition-case-unless-debug err
|
(condition-case-unless-debug err
|
||||||
(funcall frontend command)
|
(funcall frontend command)
|
||||||
@@ -1448,7 +1555,9 @@ update if FORCE-UPDATE."
|
|||||||
(and candidates
|
(and candidates
|
||||||
(not (cdr candidates))
|
(not (cdr candidates))
|
||||||
(eq t (compare-strings (car candidates) nil nil
|
(eq t (compare-strings (car candidates) nil nil
|
||||||
prefix nil nil ignore-case))))
|
prefix nil nil ignore-case))
|
||||||
|
(not (eq (company-call-backend 'kind (car candidates))
|
||||||
|
'snippet))))
|
||||||
|
|
||||||
(defun company--fetch-candidates (prefix)
|
(defun company--fetch-candidates (prefix)
|
||||||
(let* ((non-essential (not (company-explicit-action-p)))
|
(let* ((non-essential (not (company-explicit-action-p)))
|
||||||
@@ -1620,7 +1729,7 @@ end of the match."
|
|||||||
(let ((base-size (cdr company-icon-size))
|
(let ((base-size (cdr company-icon-size))
|
||||||
(dfh (default-font-height)))
|
(dfh (default-font-height)))
|
||||||
(min
|
(min
|
||||||
(if (> dfh (* 2 base-size))
|
(if (>= dfh (* 2 base-size))
|
||||||
(* 2 base-size)
|
(* 2 base-size)
|
||||||
base-size)
|
base-size)
|
||||||
(* company-icon-margin dfw))))))
|
(* company-icon-margin dfw))))))
|
||||||
@@ -1633,10 +1742,21 @@ end of the match."
|
|||||||
:background (unless (eq bkg 'unspecified)
|
:background (unless (eq bkg 'unspecified)
|
||||||
bkg)))
|
bkg)))
|
||||||
(spacer-px-width (- (* company-icon-margin dfw) icon-size)))
|
(spacer-px-width (- (* company-icon-margin dfw) icon-size)))
|
||||||
|
(cond
|
||||||
|
((<= company-icon-margin 2)
|
||||||
(concat
|
(concat
|
||||||
(propertize " " 'display spec)
|
(propertize " " 'display spec)
|
||||||
(propertize (company-space-string (1- company-icon-margin))
|
(propertize (company-space-string (1- company-icon-margin))
|
||||||
'display `(space . (:width (,spacer-px-width))))))
|
'display `(space . (:width (,spacer-px-width))))))
|
||||||
|
(t
|
||||||
|
(let* ((spacer-left (/ spacer-px-width 2))
|
||||||
|
(spacer-right (- spacer-px-width spacer-left)))
|
||||||
|
(concat
|
||||||
|
(propertize (company-space-string 1)
|
||||||
|
'display `(space . (:width (,spacer-left))))
|
||||||
|
(propertize " " 'display spec)
|
||||||
|
(propertize (company-space-string (- company-icon-margin 2))
|
||||||
|
'display `(space . (:width (,spacer-right)))))))))
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defun company-vscode-dark-icons-margin (candidate selected)
|
(defun company-vscode-dark-icons-margin (candidate selected)
|
||||||
@@ -1943,6 +2063,10 @@ prefix match (same case) will be prioritized."
|
|||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun company-manual-begin ()
|
(defun company-manual-begin ()
|
||||||
|
"Start the completion interface.
|
||||||
|
|
||||||
|
Unlike `company-complete-selection' or `company-complete', this command
|
||||||
|
doesn't cause any immediate changes to the buffer text."
|
||||||
(interactive)
|
(interactive)
|
||||||
(company-assert-enabled)
|
(company-assert-enabled)
|
||||||
(setq company--manual-action t)
|
(setq company--manual-action t)
|
||||||
@@ -2021,16 +2145,20 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
company-candidates)
|
company-candidates)
|
||||||
(t (company-cancel))))
|
(t (company-cancel))))
|
||||||
|
|
||||||
(defun company--good-prefix-p (prefix)
|
(defun company--good-prefix-p (prefix min-length)
|
||||||
(and (stringp (company--prefix-str prefix)) ;excludes 'stop
|
(and (stringp (company--prefix-str prefix)) ;excludes 'stop
|
||||||
(or (eq (cdr-safe prefix) t)
|
(or (eq (cdr-safe prefix) t)
|
||||||
(let ((len (or (cdr-safe prefix) (length prefix))))
|
(>= (or (cdr-safe prefix) (length prefix))
|
||||||
|
min-length))))
|
||||||
|
|
||||||
|
(defun company--prefix-min-length ()
|
||||||
(if company--manual-prefix
|
(if company--manual-prefix
|
||||||
(or (not company-abort-manual-when-too-short)
|
(if company-abort-manual-when-too-short
|
||||||
;; Must not be less than minimum or initial length.
|
;; Must not be less than minimum or initial length.
|
||||||
(>= len (min company-minimum-prefix-length
|
(min company-minimum-prefix-length
|
||||||
(length company--manual-prefix))))
|
(length company--manual-prefix))
|
||||||
(>= len company-minimum-prefix-length))))))
|
0)
|
||||||
|
company-minimum-prefix-length))
|
||||||
|
|
||||||
(defun company--continue ()
|
(defun company--continue ()
|
||||||
(when (company-call-backend 'no-cache company-prefix)
|
(when (company-call-backend 'no-cache company-prefix)
|
||||||
@@ -2038,7 +2166,8 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
(setq company-candidates-cache nil))
|
(setq company-candidates-cache nil))
|
||||||
(let* ((new-prefix (company-call-backend 'prefix))
|
(let* ((new-prefix (company-call-backend 'prefix))
|
||||||
(ignore-case (company-call-backend 'ignore-case))
|
(ignore-case (company-call-backend 'ignore-case))
|
||||||
(c (when (and (company--good-prefix-p new-prefix)
|
(c (when (and (company--good-prefix-p new-prefix
|
||||||
|
(company--prefix-min-length))
|
||||||
(setq new-prefix (company--prefix-str new-prefix))
|
(setq new-prefix (company--prefix-str new-prefix))
|
||||||
(= (- (point) (length new-prefix))
|
(= (- (point) (length new-prefix))
|
||||||
(- company-point (length company-prefix))))
|
(- company-point (length company-prefix))))
|
||||||
@@ -2067,7 +2196,8 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
(t (company--continue-failed new-prefix)))))
|
(t (company--continue-failed new-prefix)))))
|
||||||
|
|
||||||
(defun company--begin-new ()
|
(defun company--begin-new ()
|
||||||
(let (prefix c)
|
(let ((min-prefix (company--prefix-min-length))
|
||||||
|
prefix c)
|
||||||
(cl-dolist (backend (if company-backend
|
(cl-dolist (backend (if company-backend
|
||||||
;; prefer manual override
|
;; prefer manual override
|
||||||
(list company-backend)
|
(list company-backend)
|
||||||
@@ -2080,8 +2210,10 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
(company-call-backend 'prefix)))
|
(company-call-backend 'prefix)))
|
||||||
(company--multi-backend-adapter backend 'prefix)))
|
(company--multi-backend-adapter backend 'prefix)))
|
||||||
(when prefix
|
(when prefix
|
||||||
(when (company--good-prefix-p prefix)
|
(when (company--good-prefix-p prefix min-prefix)
|
||||||
(let ((ignore-case (company-call-backend 'ignore-case)))
|
(let ((ignore-case (company-call-backend 'ignore-case)))
|
||||||
|
;; Keep this undocumented, esp. while only 1 backend needs it.
|
||||||
|
(company-call-backend 'set-min-prefix min-prefix)
|
||||||
(setq company-prefix (company--prefix-str prefix)
|
(setq company-prefix (company--prefix-str prefix)
|
||||||
company-backend backend
|
company-backend backend
|
||||||
c (company-calculate-candidates company-prefix ignore-case))
|
c (company-calculate-candidates company-prefix ignore-case))
|
||||||
@@ -2136,7 +2268,10 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
company--manual-action nil
|
company--manual-action nil
|
||||||
company--manual-prefix nil
|
company--manual-prefix nil
|
||||||
company--point-max nil
|
company--point-max nil
|
||||||
|
company--multi-uncached-backends nil
|
||||||
|
company--multi-min-prefix nil
|
||||||
company-point nil)
|
company-point nil)
|
||||||
|
(company-cache-expire)
|
||||||
(when company-timer
|
(when company-timer
|
||||||
(cancel-timer company-timer))
|
(cancel-timer company-timer))
|
||||||
(company-echo-cancel t)
|
(company-echo-cancel t)
|
||||||
@@ -2200,7 +2335,14 @@ For more details see `company-insertion-on-trigger' and
|
|||||||
(let (company-idle-delay) ; Against misbehavior while debugging.
|
(let (company-idle-delay) ; Against misbehavior while debugging.
|
||||||
(company--perform)))
|
(company--perform)))
|
||||||
(if company-candidates
|
(if company-candidates
|
||||||
|
(progn
|
||||||
(company-call-frontends 'post-command)
|
(company-call-frontends 'post-command)
|
||||||
|
(when company-auto-update-doc
|
||||||
|
(condition-case nil
|
||||||
|
(unless (company--electric-command-p)
|
||||||
|
(company-show-doc-buffer))
|
||||||
|
(user-error nil)
|
||||||
|
(quit nil))))
|
||||||
(let ((delay (company--idle-delay)))
|
(let ((delay (company--idle-delay)))
|
||||||
(and (numberp delay)
|
(and (numberp delay)
|
||||||
(not defining-kbd-macro)
|
(not defining-kbd-macro)
|
||||||
@@ -2688,12 +2830,13 @@ inserted."
|
|||||||
(call-interactively 'company-complete-selection)
|
(call-interactively 'company-complete-selection)
|
||||||
(call-interactively 'company-complete-common)
|
(call-interactively 'company-complete-common)
|
||||||
(when company-candidates
|
(when company-candidates
|
||||||
(setq this-command 'company-complete-common)))))
|
(setq this-command 'company-complete-common)))
|
||||||
|
this-command))
|
||||||
|
|
||||||
(define-obsolete-function-alias
|
(define-obsolete-function-alias
|
||||||
'company-complete-number
|
'company-complete-number
|
||||||
'company-complete-tooltip-row
|
'company-complete-tooltip-row
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defun company-complete-tooltip-row (number)
|
(defun company-complete-tooltip-row (number)
|
||||||
"Insert a candidate visible on the tooltip's row NUMBER.
|
"Insert a candidate visible on the tooltip's row NUMBER.
|
||||||
@@ -2803,16 +2946,19 @@ from the candidates list.")
|
|||||||
'(scroll-other-window scroll-other-window-down mwheel-scroll)
|
'(scroll-other-window scroll-other-window-down mwheel-scroll)
|
||||||
"List of Commands that won't break out of electric commands.")
|
"List of Commands that won't break out of electric commands.")
|
||||||
|
|
||||||
|
(defun company--electric-command-p ()
|
||||||
|
(memq this-command company--electric-commands))
|
||||||
|
|
||||||
(defun company--electric-restore-window-configuration ()
|
(defun company--electric-restore-window-configuration ()
|
||||||
"Restore window configuration (after electric commands)."
|
"Restore window configuration (after electric commands)."
|
||||||
(when (and company--electric-saved-window-configuration
|
(when (and company--electric-saved-window-configuration
|
||||||
(not (memq this-command company--electric-commands)))
|
(not (company--electric-command-p)))
|
||||||
(set-window-configuration company--electric-saved-window-configuration)
|
(set-window-configuration company--electric-saved-window-configuration)
|
||||||
(setq company--electric-saved-window-configuration nil)))
|
(setq company--electric-saved-window-configuration nil)))
|
||||||
|
|
||||||
(defmacro company--electric-do (&rest body)
|
(defmacro company--electric-do (&rest body)
|
||||||
(declare (indent 0) (debug t))
|
(declare (indent 0) (debug t))
|
||||||
`(when (company-manual-begin)
|
`(when company-candidates
|
||||||
(cl-assert (null company--electric-saved-window-configuration))
|
(cl-assert (null company--electric-saved-window-configuration))
|
||||||
(setq company--electric-saved-window-configuration (current-window-configuration))
|
(setq company--electric-saved-window-configuration (current-window-configuration))
|
||||||
(let ((height (window-height))
|
(let ((height (window-height))
|
||||||
@@ -2835,11 +2981,7 @@ from the candidates list.")
|
|||||||
(selection (or company-selection 0)))
|
(selection (or company-selection 0)))
|
||||||
(let* ((selected (nth selection company-candidates))
|
(let* ((selected (nth selection company-candidates))
|
||||||
(doc-buffer (or (company-call-backend 'doc-buffer selected)
|
(doc-buffer (or (company-call-backend 'doc-buffer selected)
|
||||||
(if company-auto-update-doc
|
(user-error "No documentation available")))
|
||||||
(company-doc-buffer
|
|
||||||
(format "%s: No documentation available"
|
|
||||||
selected))
|
|
||||||
(user-error "No documentation available"))))
|
|
||||||
start)
|
start)
|
||||||
(when (consp doc-buffer)
|
(when (consp doc-buffer)
|
||||||
(setq start (cdr doc-buffer)
|
(setq start (cdr doc-buffer)
|
||||||
@@ -2856,10 +2998,8 @@ automatically show the documentation buffer for each selection."
|
|||||||
(interactive "P")
|
(interactive "P")
|
||||||
(when toggle-auto-update
|
(when toggle-auto-update
|
||||||
(setq company-auto-update-doc (not company-auto-update-doc)))
|
(setq company-auto-update-doc (not company-auto-update-doc)))
|
||||||
(if company-auto-update-doc
|
|
||||||
(company--show-doc-buffer)
|
|
||||||
(company--electric-do
|
(company--electric-do
|
||||||
(company--show-doc-buffer))))
|
(company--show-doc-buffer)))
|
||||||
(put 'company-show-doc-buffer 'company-keep t)
|
(put 'company-show-doc-buffer 'company-keep t)
|
||||||
|
|
||||||
(defun company-show-location ()
|
(defun company-show-location ()
|
||||||
@@ -3072,21 +3212,23 @@ If SHOW-VERSION is non-nil, show the version in the echo area."
|
|||||||
(_ (setq value (company-reformat (company--pre-render value))
|
(_ (setq value (company-reformat (company--pre-render value))
|
||||||
annotation (and annotation (company--pre-render annotation t))))
|
annotation (and annotation (company--pre-render annotation t))))
|
||||||
(ann-ralign company-tooltip-align-annotations)
|
(ann-ralign company-tooltip-align-annotations)
|
||||||
|
(ann-padding (or company-tooltip-annotation-padding 0))
|
||||||
(ann-truncate (< width
|
(ann-truncate (< width
|
||||||
(+ (length value) (length annotation)
|
(+ (length value) (length annotation)
|
||||||
(if ann-ralign 1 0))))
|
ann-padding)))
|
||||||
(ann-start (+ margin
|
(ann-start (+ margin
|
||||||
(if ann-ralign
|
(if ann-ralign
|
||||||
(if ann-truncate
|
(if ann-truncate
|
||||||
(1+ (length value))
|
(+ (length value) ann-padding)
|
||||||
(- width (length annotation)))
|
(- width (length annotation)))
|
||||||
(length value))))
|
(+ (length value) ann-padding))))
|
||||||
(ann-end (min (+ ann-start (length annotation)) (+ margin width)))
|
(ann-end (min (+ ann-start (length annotation)) (+ margin width)))
|
||||||
(line (concat left
|
(line (concat left
|
||||||
(if (or ann-truncate (not ann-ralign))
|
(if (or ann-truncate (not ann-ralign))
|
||||||
(company-safe-substring
|
(company-safe-substring
|
||||||
(concat value
|
(concat value
|
||||||
(when (and annotation ann-ralign) " ")
|
(when annotation
|
||||||
|
(company-space-string ann-padding))
|
||||||
annotation)
|
annotation)
|
||||||
0 width)
|
0 width)
|
||||||
(concat
|
(concat
|
||||||
@@ -3225,7 +3367,7 @@ If SHOW-VERSION is non-nil, show the version in the echo area."
|
|||||||
'company--show-numbers
|
'company--show-numbers
|
||||||
"use `company-quick-access-hint-key' instead,
|
"use `company-quick-access-hint-key' instead,
|
||||||
but adjust the expected values appropriately."
|
but adjust the expected values appropriately."
|
||||||
"0.9.14")
|
"0.10.0")
|
||||||
|
|
||||||
(defsubst company--window-height ()
|
(defsubst company--window-height ()
|
||||||
(if (fboundp 'window-screen-lines)
|
(if (fboundp 'window-screen-lines)
|
||||||
@@ -3314,6 +3456,9 @@ but adjust the expected values appropriately."
|
|||||||
(defun company--create-lines (selection limit)
|
(defun company--create-lines (selection limit)
|
||||||
(let ((len company-candidates-length)
|
(let ((len company-candidates-length)
|
||||||
(window-width (company--window-width))
|
(window-width (company--window-width))
|
||||||
|
(company-tooltip-annotation-padding
|
||||||
|
(or company-tooltip-annotation-padding
|
||||||
|
(if company-tooltip-align-annotations 1 0)))
|
||||||
left-margins
|
left-margins
|
||||||
left-margin-size
|
left-margin-size
|
||||||
lines
|
lines
|
||||||
@@ -3386,8 +3531,9 @@ but adjust the expected values appropriately."
|
|||||||
(setq annotation (string-trim-left annotation))))
|
(setq annotation (string-trim-left annotation))))
|
||||||
(push (list value annotation left) items)
|
(push (list value annotation left) items)
|
||||||
(setq width (max (+ (length value)
|
(setq width (max (+ (length value)
|
||||||
(if (and annotation company-tooltip-align-annotations)
|
(if annotation
|
||||||
(1+ (length annotation))
|
(+ (length annotation)
|
||||||
|
company-tooltip-annotation-padding)
|
||||||
(length annotation)))
|
(length annotation)))
|
||||||
width))))
|
width))))
|
||||||
|
|
||||||
@@ -3610,7 +3756,7 @@ Returns a negative number if the tooltip should be displayed above point."
|
|||||||
(pre-command (company-pseudo-tooltip-hide-temporarily))
|
(pre-command (company-pseudo-tooltip-hide-temporarily))
|
||||||
(unhide
|
(unhide
|
||||||
(let ((ov company-pseudo-tooltip-overlay))
|
(let ((ov company-pseudo-tooltip-overlay))
|
||||||
(when (> (overlay-get ov 'company-height) 0)
|
(when (and ov (> (overlay-get ov 'company-height) 0))
|
||||||
;; Sleight of hand: if the current line wraps, we adjust the
|
;; Sleight of hand: if the current line wraps, we adjust the
|
||||||
;; start of the overlay so that the popup does not zig-zag,
|
;; start of the overlay so that the popup does not zig-zag,
|
||||||
;; but don't update the popup's background. This seems just
|
;; but don't update the popup's background. This seems just
|
||||||
@@ -3730,6 +3876,10 @@ Delay is determined by `company-tooltip-idle-delay'."
|
|||||||
(company-strip-prefix completion)
|
(company-strip-prefix completion)
|
||||||
completion))
|
completion))
|
||||||
|
|
||||||
|
(when (string-prefix-p "\n" completion)
|
||||||
|
(setq completion (concat (propertize " " 'face 'company-preview) "\n"
|
||||||
|
(substring completion 1))))
|
||||||
|
|
||||||
(and (equal pos (point))
|
(and (equal pos (point))
|
||||||
(not (equal completion ""))
|
(not (equal completion ""))
|
||||||
(add-text-properties 0 1 '(cursor 1) completion))
|
(add-text-properties 0 1 '(cursor 1) completion))
|
||||||
@@ -3829,13 +3979,18 @@ Delay is determined by `company-tooltip-idle-delay'."
|
|||||||
:package-version '(company . "0.9.3"))
|
:package-version '(company . "0.9.3"))
|
||||||
|
|
||||||
(defun company-echo-show (&optional getter)
|
(defun company-echo-show (&optional getter)
|
||||||
|
(let ((last-msg company-echo-last-msg)
|
||||||
|
(message-log-max nil)
|
||||||
|
(message-truncate-lines company-echo-truncate-lines))
|
||||||
(when getter
|
(when getter
|
||||||
(setq company-echo-last-msg (funcall getter)))
|
(setq company-echo-last-msg (funcall getter)))
|
||||||
(let ((message-log-max nil)
|
;; Avoid modifying the echo area if we don't have anything to say, and we
|
||||||
(message-truncate-lines company-echo-truncate-lines))
|
;; didn't put the previous message there (thus there's nothing to clear),
|
||||||
(if company-echo-last-msg
|
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62816#20
|
||||||
|
(if (not (member company-echo-last-msg '(nil "")))
|
||||||
(message "%s" company-echo-last-msg)
|
(message "%s" company-echo-last-msg)
|
||||||
(message ""))))
|
(unless (member last-msg '(nil ""))
|
||||||
|
(message "")))))
|
||||||
|
|
||||||
(defun company-echo-show-soon (&optional getter delay)
|
(defun company-echo-show-soon (&optional getter delay)
|
||||||
(company-echo-cancel)
|
(company-echo-cancel)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
This is company.info, produced by makeinfo version 7.0.1 from
|
This is company.info, produced by makeinfo version 6.8 from
|
||||||
company.texi.
|
company.texi.
|
||||||
|
|
||||||
This user manual is for Company version 0.9.14snapshot (12 August 2022).
|
This user manual is for Company version 0.10.0 (16 April 2023).
|
||||||
|
|
||||||
Copyright © 2021-2022 Free Software Foundation, Inc.
|
Copyright © 2021-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this
|
Permission is granted to copy, distribute and/or modify this
|
||||||
document under the terms of the GNU Free Documentation License,
|
document under the terms of the GNU Free Documentation License,
|
||||||
@@ -26,9 +26,9 @@ The goal of this document is to lay out the foundational knowledge of
|
|||||||
the package, so that the readers of the manual could competently start
|
the package, so that the readers of the manual could competently start
|
||||||
adapting Company to their needs and preferences.
|
adapting Company to their needs and preferences.
|
||||||
|
|
||||||
This user manual is for Company version 0.9.14snapshot (12 August 2022).
|
This user manual is for Company version 0.10.0 (16 April 2023).
|
||||||
|
|
||||||
Copyright © 2021-2022 Free Software Foundation, Inc.
|
Copyright © 2021-2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this
|
Permission is granted to copy, distribute and/or modify this
|
||||||
document under the terms of the GNU Free Documentation License,
|
document under the terms of the GNU Free Documentation License,
|
||||||
@@ -206,8 +206,8 @@ shown according to the typed characters and the default (until a user
|
|||||||
specifies otherwise) configurations.
|
specifies otherwise) configurations.
|
||||||
|
|
||||||
To have Company always enabled for the following sessions, add the line
|
To have Company always enabled for the following sessions, add the line
|
||||||
‘(global-company-mode)’ to the Emacs configuration file
|
‘(global-company-mode)’ to the Emacs configuration file (*note
|
||||||
(*note (emacs)Init File::).
|
(emacs)Init File::).
|
||||||
|
|
||||||
|
|
||||||
File: company.info, Node: Usage Basics, Next: Commands, Prev: Initial Setup, Up: Getting Started
|
File: company.info, Node: Usage Basics, Next: Commands, Prev: Initial Setup, Up: Getting Started
|
||||||
@@ -318,9 +318,9 @@ File: company.info, Node: Customization, Next: Frontends, Prev: Getting Start
|
|||||||
|
|
||||||
Emacs provides two equally acceptable ways for user preferences
|
Emacs provides two equally acceptable ways for user preferences
|
||||||
configuration: via customization interface (for more details, *note
|
configuration: via customization interface (for more details, *note
|
||||||
(emacs)Easy Customization::) and a configuration file
|
(emacs)Easy Customization::) and a configuration file (*note (emacs)Init
|
||||||
(*note (emacs)Init File::). Naturally, Company can be configured by
|
File::). Naturally, Company can be configured by both of these
|
||||||
both of these approaches.
|
approaches.
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
@@ -531,6 +531,14 @@ user options.
|
|||||||
|
|
||||||
| |||||||