From a3155953d640197e2609d598dc31167059e43825 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Mon, 3 Jan 2022 19:33:12 +0100 Subject: [PATCH] update packages --- lisp/adaptive-wrap/adaptive-wrap-pkg.el | 2 + lisp/{ => adaptive-wrap}/adaptive-wrap.el | 158 ++---- lisp/all-the-icons/all-the-icons-pkg.el | 7 +- lisp/all-the-icons/all-the-icons.el | 651 ++++++++++++---------- lisp/all-the-icons/data/data-fileicons.el | 4 +- lisp/amx.el | 67 ++- lisp/anaconda-mode/anaconda-mode-pkg.el | 14 + lisp/{ => anaconda-mode}/anaconda-mode.el | 234 ++------ lisp/anaconda-mode/anaconda-mode.py | 194 +++++++ lisp/async/async-bytecomp.el | 17 +- lisp/async/async-pkg.el | 8 +- lisp/async/async.el | 60 +- lisp/async/dired-async.el | 55 +- lisp/avy.el | 11 +- lisp/awesome-tray.el | 160 +++++- lisp/versions | 16 +- settings/pre-settings.el | 1 + settings/python-settings.el | 1 + 18 files changed, 943 insertions(+), 717 deletions(-) create mode 100644 lisp/adaptive-wrap/adaptive-wrap-pkg.el rename lisp/{ => adaptive-wrap}/adaptive-wrap.el (66%) create mode 100644 lisp/anaconda-mode/anaconda-mode-pkg.el rename lisp/{ => anaconda-mode}/anaconda-mode.el (84%) create mode 100644 lisp/anaconda-mode/anaconda-mode.py diff --git a/lisp/adaptive-wrap/adaptive-wrap-pkg.el b/lisp/adaptive-wrap/adaptive-wrap-pkg.el new file mode 100644 index 00000000..890665ea --- /dev/null +++ b/lisp/adaptive-wrap/adaptive-wrap-pkg.el @@ -0,0 +1,2 @@ +;; Generated package description from adaptive-wrap.el -*- no-byte-compile: t -*- +(define-package "adaptive-wrap" "0.8" "Smart line-wrapping with wrap-prefix" 'nil :url "https://elpa.gnu.org/packages/adaptive-wrap.html" :authors '(("Stephen Berman" . "stephen.berman@gmx.net") ("Stefan Monnier" . "monnier@iro.umontreal.ca")) :maintainer '("Stephen Berman" . "stephen.berman@gmx.net")) diff --git a/lisp/adaptive-wrap.el b/lisp/adaptive-wrap/adaptive-wrap.el similarity index 66% rename from lisp/adaptive-wrap.el rename to lisp/adaptive-wrap/adaptive-wrap.el index 91f81f9f..46ede6f0 100644 --- a/lisp/adaptive-wrap.el +++ b/lisp/adaptive-wrap/adaptive-wrap.el @@ -1,10 +1,10 @@ ;;; adaptive-wrap.el --- Smart line-wrapping with wrap-prefix -;; Copyright (C) 2011-2018 Free Software Foundation, Inc. +;; Copyright (C) 2011-2021 Free Software Foundation, Inc. ;; Author: Stephen Berman ;; Stefan Monnier -;; Version: 0.7 +;; Version: 0.8 ;; 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 @@ -28,8 +28,6 @@ ;;; Code: -(require 'easymenu) - (defcustom adaptive-wrap-extra-indent 0 "Number of extra spaces to indent in `adaptive-wrap-prefix-mode'. @@ -57,7 +55,53 @@ extra indent = 2 :type 'integer :safe 'integerp :group 'visual-line) -(make-variable-buffer-local 'adaptive-wrap-extra-indent) + +(defun adaptive-wrap--face-extend-p (face) + ;; Before Emacs 27, faces always extended beyond EOL, so we check for a + ;; non-default background instead. + (cond + ((listp face) + (plist-get face (if (fboundp 'face-extend-p) :extend :background))) + ((symbolp face) + (if (fboundp 'face-extend-p) + (face-extend-p face nil t) + (face-background face nil t))))) + +(defun adaptive-wrap--prefix-face (fcp _beg end) + ;; If the fill-context-prefix already specifies a face, just use that. + (cond ((get-text-property 0 'face fcp)) + ;; Else, if the last character is a newline and has a face that + ;; extends beyond EOL, assume that this face spans the whole + ;; line and apply it to the prefix to preserve the "block" + ;; visual effect. + ;; NB: the face might not actually span the whole line: see for + ;; example removed lines in diff-mode, where the first character + ;; has the diff-indicator-removed face, while the rest of the + ;; line has the diff-removed face. + ((= (char-before end) ?\n) + (let ((eol-face (get-text-property (1- end) 'face))) + ;; `eol-face' can be a face, a "face value" + ;; (plist of face properties) or a list of one of those. + (if (or (not (consp eol-face)) (keywordp (car eol-face))) + ;; A single face. + (if (adaptive-wrap--face-extend-p eol-face) eol-face) + ;; A list of faces. Keep the ones that extend beyond EOL. + (delq nil (mapcar (lambda (f) (if (adaptive-wrap--face-extend-p f) f)) + eol-face))))))) + +(defun adaptive-wrap--prefix (fcp) + (let ((fcp-len (string-width fcp))) + (cond + ((= 0 adaptive-wrap-extra-indent) + fcp) + ((< 0 adaptive-wrap-extra-indent) + (concat fcp (make-string adaptive-wrap-extra-indent ?\s))) + ((< 0 (+ adaptive-wrap-extra-indent fcp-len)) + (substring fcp + 0 + (+ adaptive-wrap-extra-indent fcp-len))) + (t + "")))) (defun adaptive-wrap-fill-context-prefix (beg end) "Like `fill-context-prefix', but with length adjusted by `adaptive-wrap-extra-indent'." @@ -72,23 +116,12 @@ extra indent = 2 (fill-context-prefix beg end)) ;; Note: fill-context-prefix may return nil; See: ;; http://article.gmane.org/gmane.emacs.devel/156285 - "")) - (fcp-len (string-width fcp)) - (fill-char (if (< 0 fcp-len) - (string-to-char (substring fcp -1)) - ?\ ))) - (cond - ((= 0 adaptive-wrap-extra-indent) - fcp) - ((< 0 adaptive-wrap-extra-indent) - (concat fcp - (make-string adaptive-wrap-extra-indent fill-char))) - ((< 0 (+ adaptive-wrap-extra-indent fcp-len)) - (substring fcp - 0 - (+ adaptive-wrap-extra-indent fcp-len))) - (t - "")))) + "")) + (prefix (adaptive-wrap--prefix fcp)) + (face (adaptive-wrap--prefix-face fcp beg end))) + (if face + (propertize prefix 'face face) + prefix))) (defun adaptive-wrap-prefix-function (beg end) "Indent the region between BEG and END with adaptive filling." @@ -155,86 +188,5 @@ extra indent = 2 :button (:toggle . (bound-and-true-p adaptive-wrap-prefix-mode))) word-wrap) -;;;; ChangeLog: - -;; 2018-10-16 Stefan Monnier -;; -;; * adaptive-wrap.el (adaptive-wrap-fill-context-prefix): Ignore -;; paragraph-start -;; -;; (and rename 'en' to 'end'). Reported by Dmitry Safronov -;; -;; -;; 2018-10-15 Stefan Monnier -;; -;; * adaptive-wrap/adaptive-wrap.el: Fix interaction with visual-fill -;; -;; (adaptive-wrap-prefix-function): Remove problematic 'display' properties -;; as well. -;; -;; 2018-03-12 Stefan Monnier -;; -;; * adaptive-wrap/adaptive-wrap.el: Fix use without font-lock -;; -;; (adaptive-wrap-prefix-function): Work on whole lines. Fix a kind of -;; memory leak. -;; -;; 2017-05-04 Noam Postavsky -;; -;; Mark adaptive-wrap-extra-indent as safe if integerp (Bug#23816) -;; -;; * packages/adaptive-wrap/adaptive-wrap.el: Bump version, copyright. -;; (adaptive-wrap-extra-indent): Mark as safe if integerp. -;; -;; 2013-08-24 Stefan Monnier -;; -;; * adaptive-wrap.el (adaptive-wrap-mode): Move after font-lock -;; (bug#15155). -;; -;; 2013-07-31 Stephen Berman -;; -;; * adaptive-wrap.el: Fix bug#14974 by using define-key-after instead of -;; easy-menu-add-item. -;; (adaptive-wrap-unload-function): Remove. -;; -;; 2013-07-29 Stephen Berman -;; -;; * adaptive-wrap.el: Require easymenu (bug#14974). -;; -;; 2013-07-19 Rüdiger Sonderfeld -;; -;; * adaptive-wrap.el (menu-bar-options-menu): Add checkbox for Adaptive -;; Wrap to the Line Wrapping submenu. -;; (adaptive-wrap-unload-function): New function. -;; -;; 2013-02-01 Stephen Berman -;; -;; Fix error during redisplay: (wrong-type-argument stringp nil) -;; -;; 2012-12-05 Stefan Monnier -;; -;; * adaptive-wrap.el (adaptive-wrap-extra-indent): Fix buffer-localness. -;; Reported by Jonathan Kotta . -;; -;; 2012-10-30 Stefan Monnier -;; -;; Clean up copyright notices. -;; -;; 2012-05-21 Jonathan Kotta -;; -;; Add adaptive-wrap-extra-indent. -;; * adaptive-wrap/adaptive-wrap.el (adaptive-wrap-extra-indent): New var. -;; (adaptive-wrap-fill-context-prefix): New function. -;; (adaptive-wrap-prefix-function): Use it. -;; (adaptive-wrap-prefix-mode): Add to visual-line custom group. -;; -;; 2012-01-05 Chong Yidong -;; -;; Rename adaptive-wrap-prefix to adaptive-wrap. -;; -;; The old name overflowed the column in list-packages. -;; - - (provide 'adaptive-wrap) ;;; adaptive-wrap.el ends here diff --git a/lisp/all-the-icons/all-the-icons-pkg.el b/lisp/all-the-icons/all-the-icons-pkg.el index 6dee3c79..11277457 100644 --- a/lisp/all-the-icons/all-the-icons-pkg.el +++ b/lisp/all-the-icons/all-the-icons-pkg.el @@ -1,7 +1,6 @@ -(define-package "all-the-icons" "20210106.1227" "A library for inserting Developer icons" - '((emacs "24.3") - (memoize "1.0.1")) - :commit "9aa16ae198073fe839a0abfa9a7d3a9dc85ef5f9" :authors +(define-package "all-the-icons" "20211225.506" "A library for inserting Developer icons" + '((emacs "24.3")) + :commit "6d48bc9e970ab559bc35a125c55fd83732595706" :authors '(("Dominic Charlesworth" . "dgc336@gmail.com")) :maintainer '("Dominic Charlesworth" . "dgc336@gmail.com") diff --git a/lisp/all-the-icons/all-the-icons.el b/lisp/all-the-icons/all-the-icons.el index 4a21b441..c801545e 100644 --- a/lisp/all-the-icons/all-the-icons.el +++ b/lisp/all-the-icons/all-the-icons.el @@ -1,10 +1,10 @@ -;;; all-the-icons.el --- A library for inserting Developer icons +;;; all-the-icons.el --- A library for inserting Developer icons -*- lexical-binding: t; -*- ;; Copyright (C) 2016 Dominic Charlesworth ;; Author: Dominic Charlesworth -;; Version: 4.0.0 -;; Package-Requires: ((emacs "24.3") (memoize "1.0.1")) +;; Version: 5.0.0 +;; Package-Requires: ((emacs "24.3")) ;; URL: https://github.com/domtronn/all-the-icons.el ;; Keywords: convenient, lisp @@ -86,15 +86,14 @@ ;; All the alist variables are prefixed with `all-the-icons-data/' ;;; Code: -(require 'memoize) (require 'cl-lib) -(require 'data-alltheicons "./data/data-alltheicons.el") -(require 'data-faicons "./data/data-faicons.el") -(require 'data-fileicons "./data/data-fileicons.el") -(require 'data-octicons "./data/data-octicons.el") -(require 'data-weathericons "./data/data-weathericons.el") -(require 'data-material "./data/data-material.el") +(require 'data-alltheicons "./data/data-alltheicons") +(require 'data-faicons "./data/data-faicons") +(require 'data-fileicons "./data/data-fileicons") +(require 'data-octicons "./data/data-octicons") +(require 'data-weathericons "./data/data-weathericons") +(require 'data-material "./data/data-material") (require 'all-the-icons-faces) @@ -124,140 +123,336 @@ (defvar all-the-icons-font-families '() "List of defined icon font families.") (defvar all-the-icons-font-names '() "List of defined font file names this package was built with.") -(defvar all-the-icons-icon-alist +(defvar all-the-icons-extension-icon-alist '( + ("fish" all-the-icons-alltheicon "terminal" :face all-the-icons-lpink) + ("zsh" all-the-icons-alltheicon "terminal" :face all-the-icons-lcyan) + ("sh" all-the-icons-alltheicon "terminal" :face all-the-icons-purple) ;; Meta - ("\\.tags" all-the-icons-octicon "tag" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) - ("^TAGS$" all-the-icons-octicon "tag" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) - ("\\.log" all-the-icons-octicon "bug" :height 1.0 :v-adjust 0.0 :face all-the-icons-maroon) - + ("tags" all-the-icons-octicon "tag" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) + ("log" all-the-icons-octicon "bug" :height 1.0 :v-adjust 0.0 :face all-the-icons-maroon) + ;; Config + ("node" all-the-icons-alltheicon "nodejs" :height 1.0 :face all-the-icons-green) + ("babelrc" all-the-icons-fileicon "babel" :face all-the-icons-yellow) + ("bashrc" all-the-icons-alltheicon "script" :height 0.9 :face all-the-icons-dpink) + ("bowerrc" all-the-icons-alltheicon "bower" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver) + ("ini" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow) + ("eslintignore" all-the-icons-fileicon "eslint" :height 0.9 :face all-the-icons-purple) + ("eslint" all-the-icons-fileicon "eslint" :height 0.9 :face all-the-icons-lpurple) + ("git" all-the-icons-alltheicon "git" :height 1.0 :face all-the-icons-lred) + ("mk" all-the-icons-fileicon "gnu" :face all-the-icons-dorange) + ("cmake" all-the-icons-fileicon "cmake" :face all-the-icons-red) + ("dockerignore" all-the-icons-fileicon "dockerfile" :height 1.2 :face all-the-icons-dblue) + ("xml" all-the-icons-faicon "file-code-o" :height 0.95 :face all-the-icons-lorange) + ("json" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow) + ("cson" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow) + ("yml" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow) + ("yaml" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow) + ;; ? + ("pkg" all-the-icons-octicon "package" :v-adjust 0.0 :face all-the-icons-dsilver) + ("rpm" all-the-icons-octicon "package" :v-adjust 0.0 :face all-the-icons-dsilver) + ("elc" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-dsilver) + ("gz" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-lmaroon) + ("zip" all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon) + ("7z" all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon) + ("dat" all-the-icons-faicon "bar-chart" :face all-the-icons-cyan :height 0.9) + ("dmg" all-the-icons-octicon "tools" :v-adjust 0.0 :face all-the-icons-lsilver) + ("dll" all-the-icons-faicon "cogs" :face all-the-icons-silver) + ("ds_store" all-the-icons-faicon "cogs" :face all-the-icons-silver) + ;; Source Codes + ("scpt" all-the-icons-fileicon "apple" :face all-the-icons-pink) + ("aup" all-the-icons-fileicon "audacity" :face all-the-icons-yellow) + ("elm" all-the-icons-fileicon "elm" :face all-the-icons-blue) + ("erl" all-the-icons-alltheicon "erlang" :face all-the-icons-red :v-adjust -0.1 :height 0.9) + ("hrl" all-the-icons-alltheicon "erlang" :face all-the-icons-dred :v-adjust -0.1 :height 0.9) + ("eex" all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9) + ("leex" all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9) + ("heex" all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9) + ("ex" all-the-icons-alltheicon "elixir" :face all-the-icons-lpurple :v-adjust -0.1 :height 0.9) + ("exs" all-the-icons-alltheicon "elixir" :face all-the-icons-lred :v-adjust -0.1 :height 0.9) + ("java" all-the-icons-alltheicon "java" :height 1.0 :face all-the-icons-purple) + ("ebuild" all-the-icons-fileicon "gentoo" :face all-the-icons-cyan) + ("eclass" all-the-icons-fileicon "gentoo" :face all-the-icons-blue) + ("go" all-the-icons-fileicon "go" :height 1.0 :face all-the-icons-blue) + ("jl" all-the-icons-fileicon "julia" :face all-the-icons-purple :v-adjust 0.0) + ("matlab" all-the-icons-fileicon "matlab" :face all-the-icons-orange) + ("nix" all-the-icons-fileicon "nix" :face all-the-icons-blue) + ("pl" all-the-icons-alltheicon "perl" :face all-the-icons-lorange) + ("pm" all-the-icons-alltheicon "perl" :face all-the-icons-lorange) + ("pl6" all-the-icons-fileicon "raku" :face all-the-icons-cyan) + ("pm6" all-the-icons-fileicon "raku" :face all-the-icons-pink) + ("pod" all-the-icons-alltheicon "perldocs" :height 1.2 :face all-the-icons-lgreen) + ("php" all-the-icons-fileicon "php" :face all-the-icons-lsilver) + ("pony" all-the-icons-fileicon "pony" :face all-the-icons-maroon) + ("ps1" all-the-icons-fileicon "powershell" :face all-the-icons-blue) + ("pro" all-the-icons-alltheicon "prolog" :height 1.1 :face all-the-icons-lmaroon) + ("proog" all-the-icons-alltheicon "prolog" :height 1.1 :face all-the-icons-lmaroon) + ("py" all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue) + ("idr" all-the-icons-fileicon "idris" :face all-the-icons-red) + ("ipynb" all-the-icons-fileicon "jupyter" :height 1.0 :face all-the-icons-dorange) + ("gem" all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red) + ("raku" all-the-icons-fileicon "raku" :face all-the-icons-cyan) + ("rakumod" all-the-icons-fileicon "raku" :face all-the-icons-pink) + ("rb" all-the-icons-octicon "ruby" :v-adjust 0.0 :face all-the-icons-lred) + ("rs" all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon) + ("rlib" all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-dmaroon) + ("r" 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) + ("rsx" all-the-icons-fileicon "R" :face all-the-icons-lblue) + ;; There seems to be a a bug with this font icon which does not + ;; let you propertise it without it reverting to being a lower + ;; case phi + ("c" all-the-icons-alltheicon "c-line" :face all-the-icons-blue) + ("h" all-the-icons-alltheicon "c-line" :face all-the-icons-purple) + ("m" all-the-icons-fileicon "apple" :v-adjust 0.0 :height 1.0) + ("mm" all-the-icons-fileicon "apple" :v-adjust 0.0 :height 1.0) ;; - ("\\.key$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) - ("\\.pem$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-orange) - ("\\.p12$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-dorange) - ("\\.crt$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) - ("\\.pub$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-blue) - ("\\.gpg$" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) + ("cc" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue) + ("cpp" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue) + ("cxx" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue) + ("hh" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-purple) + ("hpp" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-purple) + ("hxx" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-purple) + ;; Lisps + ("cl" all-the-icons-fileicon "clisp" :face all-the-icons-lorange) + ("l" all-the-icons-fileicon "lisp" :face all-the-icons-orange) + ("lisp" all-the-icons-fileicon "lisp" :face all-the-icons-orange) + ("hy" all-the-icons-fileicon "hy" :face all-the-icons-blue) + ("el" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.2 :face all-the-icons-purple) + ("clj" all-the-icons-alltheicon "clojure-line" :height 1.0 :face all-the-icons-blue :v-adjust 0.0) + ("cljc" all-the-icons-alltheicon "clojure-line" :height 1.0 :face all-the-icons-blue :v-adjust 0.0) + ("cljs" all-the-icons-fileicon "cljs" :height 1.0 :face all-the-icons-dblue :v-adjust 0.0) + ("coffee" all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-maroon) + ("iced" all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-lmaroon) + ("dart" all-the-icons-fileicon "dart" :height 1.0 :face all-the-icons-blue :v-adjust 0.0) + ("rkt" all-the-icons-fileicon "racket" :height 1.2 :face all-the-icons-red) + ("scrbl" all-the-icons-fileicon "racket" :height 1.2 :face all-the-icons-blue) + ;; Stylesheeting + ("css" all-the-icons-alltheicon "css3" :face all-the-icons-yellow) + ("scss" all-the-icons-alltheicon "sass" :face all-the-icons-pink) + ("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) + ("postcss" 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) + ("csv" all-the-icons-octicon "graph" :v-adjust 0.0 :face all-the-icons-dblue) + ;; haskell + ("hs" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) + ("chs" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) + ("lhs" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) + ("hsc" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) + ;; Web modes + ("inky-haml" all-the-icons-fileicon "haml" :face all-the-icons-lyellow) + ("haml" all-the-icons-fileicon "haml" :face all-the-icons-lyellow) + ("htm" all-the-icons-alltheicon "html5" :face all-the-icons-orange) + ("html" all-the-icons-alltheicon "html5" :face all-the-icons-orange) + ("inky-er" all-the-icons-alltheicon "html5" :face all-the-icons-lred) + ("inky-erb" all-the-icons-alltheicon "html5" :face all-the-icons-lred) + ("erb" all-the-icons-alltheicon "html5" :face all-the-icons-lred) + ("hbs" all-the-icons-fileicon "moustache" :face all-the-icons-green) + ("inky-slim" all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow) + ("slim" all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow) + ("jade" all-the-icons-fileicon "jade" :face all-the-icons-red) + ("pug" all-the-icons-fileicon "pug-alt" :face all-the-icons-red) + ;; Javascript + ("d3js" all-the-icons-alltheicon "d3" :height 0.8 :face all-the-icons-lgreen) + ("re" all-the-icons-fileicon "reason" :height 1.0 :face all-the-icons-red-alt) + ("rei" all-the-icons-fileicon "reason" :height 1.0 :face all-the-icons-dred) + ("ml" all-the-icons-fileicon "ocaml" :height 1.0 :face all-the-icons-lpink) + ("mli" all-the-icons-fileicon "ocaml" :height 1.0 :face all-the-icons-dpink) + ("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) + ("js" 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) + ("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) + ("sbt" all-the-icons-fileicon "sbt" :face all-the-icons-red) + ("scala" all-the-icons-alltheicon "scala" :face all-the-icons-red) + ("scm" all-the-icons-fileicon "scheme" :height 1.2 :face all-the-icons-red) + ("swift" all-the-icons-alltheicon "swift" :height 1.0 :v-adjust -0.1 :face all-the-icons-green) + + ("tcl" all-the-icons-fileicon "tcl" :height 1.0 :face all-the-icons-dred) + + ("tf" all-the-icons-fileicon "terraform" :height 1.0 :face all-the-icons-purple-alt) + ("tfvars" all-the-icons-fileicon "terraform" :height 1.0 :face all-the-icons-purple-alt) + ("tfstate" all-the-icons-fileicon "terraform" :height 1.0 :face all-the-icons-purple-alt) + + ("asm" all-the-icons-fileicon "assembly" :height 1.0 :face all-the-icons-blue) + ;; Verilog(-AMS) and SystemVerilog(-AMS) + ("v" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ("vams" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ("sv" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ("sva" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ("svh" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ("svams" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) + ;; VHDL(-AMS) + ("vhd" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) + ("vhdl" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) + ("vhms" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) + ;; Cabal + ("cabal" all-the-icons-fileicon "cabal" :face all-the-icons-lblue) + ;; Kotlin + ("kt" all-the-icons-fileicon "kotlin" :face all-the-icons-orange) + ("kts" all-the-icons-fileicon "kotlin" :face all-the-icons-orange) + ;; Nimrod + ("nim" all-the-icons-fileicon "nimrod" :face all-the-icons-yellow) + ("nims" all-the-icons-fileicon "nimrod" :face all-the-icons-yellow) + ;; SQL + ("sql" all-the-icons-octicon "database" :face all-the-icons-silver) + ;; Styles + ("styles" all-the-icons-material "style" :face all-the-icons-red) + ;; Lua + ("lua" all-the-icons-fileicon "lua" :face all-the-icons-dblue) + ;; ASCII doc + ("adoc" all-the-icons-fileicon "asciidoc" :face all-the-icons-lblue) + ("asciidoc" all-the-icons-fileicon "asciidoc" :face all-the-icons-lblue) + ;; Puppet + ("pp" all-the-icons-fileicon "puppet" :face all-the-icons-yellow) + ;; Jinja + ("j2" all-the-icons-fileicon "jinja" :face all-the-icons-silver) + ("jinja2" all-the-icons-fileicon "jinja" :face all-the-icons-silver) + ;; Docker + ("dockerfile" all-the-icons-fileicon "dockerfile" :face all-the-icons-cyan) + ;; Vagrant + ("vagrantfile" all-the-icons-fileicon "vagrant" :face all-the-icons-blue) + ;; GLSL + ("glsl" all-the-icons-fileicon "vertex-shader" :face all-the-icons-blue) + ("vert" all-the-icons-fileicon "vertex-shader" :face all-the-icons-blue) + ("tesc" all-the-icons-fileicon "vertex-shader" :face all-the-icons-purple) + ("tese" all-the-icons-fileicon "vertex-shader" :face all-the-icons-dpurple) + ("geom" all-the-icons-fileicon "vertex-shader" :face all-the-icons-green) + ("frag" all-the-icons-fileicon "vertex-shader" :face all-the-icons-red) + ("comp" all-the-icons-fileicon "vertex-shader" :face all-the-icons-dblue) + ;; CUDA + ("cu" all-the-icons-fileicon "nvidia" :face all-the-icons-green) + ("cuh" all-the-icons-fileicon "nvidia" :face all-the-icons-green) + ;; Fortran + ("f90" all-the-icons-fileicon "fortran" :face all-the-icons-purple) + ;; C# + ("cs" all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue) + ("csx" all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue) + ;; F# + ("fs" all-the-icons-fileicon "fsharp" :face all-the-icons-blue-alt) + ("fsi" all-the-icons-fileicon "fsharp" :face all-the-icons-blue-alt) + ("fsx" all-the-icons-fileicon "fsharp" :face all-the-icons-blue-alt) + ("fsscript" all-the-icons-fileicon "fsharp" :face all-the-icons-blue-alt) + ;; zig + ("zig" all-the-icons-fileicon "zig" :face all-the-icons-orange) + ;; File Types + ("ico" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-blue) + ("png" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-orange) + ("gif" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-green) + ("jpeg" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dblue) + ("jpg" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dblue) + ("webp" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dblue) + ;; Audio + ("mp3" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("wav" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("m4a" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("ogg" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("flac" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("opus" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("au" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("aif" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("aifc" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("aiff" all-the-icons-faicon "volume-up" :face all-the-icons-dred) + ("svg" all-the-icons-alltheicon "svg" :height 0.9 :face all-the-icons-lgreen) + ;; Video + ("mov" all-the-icons-faicon "film" :face all-the-icons-blue) + ("mp4" all-the-icons-faicon "film" :face all-the-icons-blue) + ("ogv" all-the-icons-faicon "film" :face all-the-icons-dblue) + ("mpg" all-the-icons-faicon "film" :face all-the-icons-blue) + ("mpeg" all-the-icons-faicon "film" :face all-the-icons-blue) + ("flv" all-the-icons-faicon "film" :face all-the-icons-blue) + ("ogv" all-the-icons-faicon "film" :face all-the-icons-dblue) + ("mkv" all-the-icons-faicon "film" :face all-the-icons-blue) + ("webm" all-the-icons-faicon "film" :face all-the-icons-blue) + ;; Fonts + ("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) + ("woff2" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-cyan) + ;; Doc + ("pdf" all-the-icons-octicon "file-pdf" :v-adjust 0.0 :face all-the-icons-dred) + ("text" all-the-icons-octicon "file-text" :v-adjust 0.0 :face all-the-icons-cyan) + ("txt" all-the-icons-octicon "file-text" :v-adjust 0.0 :face all-the-icons-cyan) + ("doc" 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) + ("texi" 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) + ("bib" all-the-icons-fileicon "bib" :face all-the-icons-maroon) + ("org" all-the-icons-fileicon "org" :face all-the-icons-lgreen) + ("pps" 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) + ("ppttx" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange) + ("knt" all-the-icons-fileicon "powerpoint" :face all-the-icons-cyan) + ("xlsx" all-the-icons-fileicon "excel" :face all-the-icons-dgreen) + ("xlsm" all-the-icons-fileicon "excel" :face all-the-icons-dgreen) + ("xlsb" all-the-icons-fileicon "excel" :face all-the-icons-dgreen) + ("xltx" all-the-icons-fileicon "excel" :face all-the-icons-dgreen) + ("xltm" all-the-icons-fileicon "excel" :face all-the-icons-dgreen) + ;; + ("key" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) + ("pem" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-orange) + ("p12" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-dorange) + ("crt" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) + ("pub" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-blue) + ("gpg" all-the-icons-octicon "key" :v-adjust 0.0 :face all-the-icons-lblue) + ("cache" all-the-icons-octicon "database" :height 1.0 :v-adjust 0.0 :face all-the-icons-green))) + + +(define-obsolete-variable-alias 'all-the-icons-icon-alist + 'all-the-icons-regexp-icon-alist + "5.0.0" + "`all-the-icons-icon-alist' has been split to +`all-the-icons-extension-icon-alist' and `all-the-icons-regexp-icon-alist' +for performance sake.") + +(defvar all-the-icons-regexp-icon-alist + '( + ;; + ("^TAGS$" all-the-icons-octicon "tag" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) ("^TODO$" all-the-icons-octicon "checklist" :v-adjust 0.0 :face all-the-icons-lyellow) ("^LICENSE$" all-the-icons-octicon "book" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) ("^readme" all-the-icons-octicon "book" :height 1.0 :v-adjust 0.0 :face all-the-icons-lcyan) - ("\\.fish" all-the-icons-alltheicon "terminal" :face all-the-icons-lpink) - ("\\.zsh" all-the-icons-alltheicon "terminal" :face all-the-icons-lcyan) - ("\\.sh" all-the-icons-alltheicon "terminal" :face all-the-icons-purple) - ;; Config - ("\\.node" all-the-icons-alltheicon "nodejs" :height 1.0 :face all-the-icons-green) - ("\\.babelrc$" all-the-icons-fileicon "babel" :face all-the-icons-yellow) - ("\\.bashrc$" all-the-icons-alltheicon "script" :height 0.9 :face all-the-icons-dpink) - ("\\.bowerrc$" all-the-icons-alltheicon "bower" :height 1.0 :v-adjust 0.0 :face all-the-icons-silver) ("^bower.json$" all-the-icons-alltheicon "bower" :height 1.0 :v-adjust 0.0 :face all-the-icons-lorange) - ("\\.ini$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow) - ("\\.eslintignore" all-the-icons-fileicon "eslint" :height 0.9 :face all-the-icons-purple) - ("\\.eslint" all-the-icons-fileicon "eslint" :height 0.9 :face all-the-icons-lpurple) - ("\\.git" all-the-icons-alltheicon "git" :height 1.0 :face all-the-icons-lred) ("nginx" all-the-icons-fileicon "nginx" :height 0.9 :face all-the-icons-dgreen) ("apache" all-the-icons-alltheicon "apache" :height 0.9 :face all-the-icons-dgreen) ("^Makefile$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange) - ("\\.mk$" all-the-icons-fileicon "gnu" :face all-the-icons-dorange) + ("^CMakeLists.txt$" all-the-icons-fileicon "cmake" :face all-the-icons-red) + ("^CMakeCache.txt$" all-the-icons-fileicon "cmake" :face all-the-icons-blue) - ("\\.dockerignore$" all-the-icons-fileicon "dockerfile" :height 1.2 :face all-the-icons-dblue) ("^\\.?Dockerfile" all-the-icons-fileicon "dockerfile" :face all-the-icons-blue) ("^Brewfile$" all-the-icons-faicon "beer" :face all-the-icons-lsilver) - ("\\.npmignore" all-the-icons-fileicon "npm" :face all-the-icons-dred) + ("\\.npmignore$" all-the-icons-fileicon "npm" :face all-the-icons-dred) ("^package.json$" all-the-icons-fileicon "npm" :face all-the-icons-red) ("^package.lock.json$" all-the-icons-fileicon "npm" :face all-the-icons-dred) ("^yarn\\.lock" all-the-icons-fileicon "yarn" :face all-the-icons-blue-alt) - ("\\.xml$" all-the-icons-faicon "file-code-o" :height 0.95 :face all-the-icons-lorange) - ;; ;; AWS ("^stack.*.json$" all-the-icons-alltheicon "aws" :face all-the-icons-orange) ("^serverless\\.yml$" all-the-icons-faicon "bolt" :v-adjust 0.0 :face all-the-icons-yellow) - ("\\.[jc]son$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow) - ("\\.ya?ml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow) - ("\\.pkg$" all-the-icons-octicon "package" :v-adjust 0.0 :face all-the-icons-dsilver) - ("\\.rpm$" all-the-icons-octicon "package" :v-adjust 0.0 :face all-the-icons-dsilver) - - ("\\.elc$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-dsilver) - - ("\\.gz$" all-the-icons-octicon "file-binary" :v-adjust 0.0 :face all-the-icons-lmaroon) - ("\\.zip$" all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon) - ("\\.7z$" all-the-icons-octicon "file-zip" :v-adjust 0.0 :face all-the-icons-lmaroon) - - ("\\.dat$" all-the-icons-faicon "bar-chart" :face all-the-icons-cyan :height 0.9) ;; lock files ("~$" all-the-icons-octicon "lock" :v-adjust 0.0 :face all-the-icons-maroon) - ("\\.dmg$" all-the-icons-octicon "tools" :v-adjust 0.0 :face all-the-icons-lsilver) - ("\\.dll$" all-the-icons-faicon "cogs" :face all-the-icons-silver) - ("\\.DS_STORE$" all-the-icons-faicon "cogs" :face all-the-icons-silver) - ;; Source Codes - ("\\.scpt$" all-the-icons-fileicon "apple" :face all-the-icons-pink) - ("\\.aup$" all-the-icons-fileicon "audacity" :face all-the-icons-yellow) - - ("\\.elm" all-the-icons-fileicon "elm" :face all-the-icons-blue) - - ("\\.erl$" all-the-icons-alltheicon "erlang" :face all-the-icons-red :v-adjust -0.1 :height 0.9) - ("\\.hrl$" all-the-icons-alltheicon "erlang" :face all-the-icons-dred :v-adjust -0.1 :height 0.9) - - ("\\.eex$" all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9) - ("\\.leex$" all-the-icons-alltheicon "elixir" :face all-the-icons-lorange :v-adjust -0.1 :height 0.9) - ("\\.ex$" all-the-icons-alltheicon "elixir" :face all-the-icons-lpurple :v-adjust -0.1 :height 0.9) - ("\\.exs$" all-the-icons-alltheicon "elixir" :face all-the-icons-lred :v-adjust -0.1 :height 0.9) ("^mix.lock$" all-the-icons-alltheicon "elixir" :face all-the-icons-lyellow :v-adjust -0.1 :height 0.9) - ("\\.java$" all-the-icons-alltheicon "java" :height 1.0 :face all-the-icons-purple) - - ("\\.go$" all-the-icons-fileicon "go" :height 1.0 :face all-the-icons-blue) - - ("\\.mp3$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.wav$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.m4a$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.ogg$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.flac$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.opus$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.au$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - ("\\.aif[fc]?$" all-the-icons-faicon "volume-up" :face all-the-icons-dred) - - ("\\.jl$" all-the-icons-fileicon "julia" :v-adjust 0.0 :face all-the-icons-purple) - ("\\.matlab$" all-the-icons-fileicon "matlab" :face all-the-icons-orange) - - ("\\.nix$" all-the-icons-fileicon "nix" :face all-the-icons-blue) - - ("\\.p[ml]$" all-the-icons-alltheicon "perl" :face all-the-icons-lorange) - ("\\.pl6$" all-the-icons-fileicon "perl6" :face all-the-icons-cyan) - ("\\.pm6$" all-the-icons-fileicon "perl6" :face all-the-icons-pink) - ("\\.pod$" all-the-icons-alltheicon "perldocs" :height 1.2 :face all-the-icons-lgreen) - - ("\\.php$" all-the-icons-fileicon "php" :face all-the-icons-lsilver) - ("\\.pony$" all-the-icons-fileicon "pony" :face all-the-icons-maroon) - ("\\.ps1$" all-the-icons-fileicon "powershell" :face all-the-icons-blue) - ("\\.prol?o?g?$" all-the-icons-alltheicon "prolog" :height 1.1 :face all-the-icons-lmaroon) - ("\\.py$" all-the-icons-alltheicon "python" :height 1.0 :face all-the-icons-dblue) - ("\\.ipynb$" all-the-icons-fileicon "jupyter" :height 1.0 :face all-the-icons-dorange) - - ("\\.rkt$" all-the-icons-fileicon "racket" :height 1.2 :face all-the-icons-red) ("^Gemfile\\(\\.lock\\)?$" all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red) - ("\\.gem$" all-the-icons-alltheicon "ruby-alt" :face all-the-icons-red) ("_?test\\.rb$" all-the-icons-fileicon "test-ruby" :height 1.0 :v-adjust 0.0 :face all-the-icons-red) ("_?test_helper\\.rb$" all-the-icons-fileicon "test-ruby" :height 1.0 :v-adjust 0.0 :face all-the-icons-dred) ("_?spec\\.rb$" all-the-icons-fileicon "test-ruby" :height 1.0 :v-adjust 0.0 :face all-the-icons-red) ("_?spec_helper\\.rb$" all-the-icons-fileicon "test-ruby" :height 1.0 :v-adjust 0.0 :face all-the-icons-dred) - ("\\.rb$" all-the-icons-octicon "ruby" :v-adjust 0.0 :face all-the-icons-lred) - ("\\.rs$" all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-maroon) - ("\\.rlib$" all-the-icons-alltheicon "rust" :height 1.2 :face all-the-icons-dmaroon) - ("\\.r[ds]?x?$" all-the-icons-fileicon "R" :face all-the-icons-lblue) - - ("\\.sbt$" all-the-icons-fileicon "sbt" :face all-the-icons-red) - ("\\.scala$" all-the-icons-alltheicon "scala" :face all-the-icons-red) - ("\\.scm$" all-the-icons-fileicon "scheme" :height 1.2 :face all-the-icons-red) - ("\\.swift$" all-the-icons-alltheicon "swift" :height 1.0 :v-adjust -0.1 :face all-the-icons-green) ("-?spec\\.ts$" all-the-icons-fileicon "test-typescript" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) ("-?test\\.ts$" all-the-icons-fileicon "test-typescript" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue) @@ -266,176 +461,18 @@ ("-?spec\\.jsx$" all-the-icons-fileicon "test-react" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue-alt) ("-?test\\.jsx$" all-the-icons-fileicon "test-react" :height 1.0 :v-adjust 0.0 :face all-the-icons-blue-alt) - ("-?spec\\." all-the-icons-fileicon "test-generic" :height 1.0 :v-adjust 0.0 :face all-the-icons-dgreen) - ("-?test\\." all-the-icons-fileicon "test-generic" :height 1.0 :v-adjust 0.0 :face all-the-icons-dgreen) - - ("\\.tf\\(vars\\|state\\)?$" all-the-icons-fileicon "terraform" :height 1.0 :face all-the-icons-purple-alt) - - ;; Verilog(-AMS) and SystemVerilog(-AMS) - ("\\.v$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - ("\\.vams$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - ("\\.sv$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - ("\\.sva$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - ("\\.svh$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - ("\\.svams$" all-the-icons-fileicon "verilog" :height 1.0 :v-adjust -0.2 :face all-the-icons-red) - - ;; VHDL(-AMS) - ("\\.vhd$" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) - ("\\.vhdl$" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) - ("\\.vhms$" all-the-icons-fileicon "vhdl" :face all-the-icons-blue) - - ;; Cabal - ("\\.cabal$" all-the-icons-fileicon "cabal" :face all-the-icons-lblue) - - ;; Kotlin - ("\\.kt$" all-the-icons-fileicon "kotlin" :face all-the-icons-orange) - ("\\.kts$" all-the-icons-fileicon "kotlin" :face all-the-icons-orange) - - ;; Nimrod - ("\\.nim$" all-the-icons-fileicon "nimrod" :face all-the-icons-yellow) - ("\\.nims$" all-the-icons-fileicon "nimrod" :face all-the-icons-yellow) - - ;; SQL - ("\\.sql$" all-the-icons-octicon "database" :face all-the-icons-silver) - - ;; Styles - ("\\.styles$" all-the-icons-material "style" :face all-the-icons-red) - - ;; Lua - ("\\.lua$" all-the-icons-fileicon "lua" :face all-the-icons-dblue) - - ;; ASCII doc - ("\\.adoc$" all-the-icons-fileicon "asciidoc" :face all-the-icons-lblue) - ("\\.asciidoc$" all-the-icons-fileicon "asciidoc" :face all-the-icons-lblue) - - ;; Puppet - ("\\.pp$" all-the-icons-fileicon "puppet" :face all-the-icons-yellow) - - ;; Jinja - ("\\.j2$" all-the-icons-fileicon "jinja" :face all-the-icons-silver) - ("\\.jinja2$" all-the-icons-fileicon "jinja" :face all-the-icons-silver) - - ;; Docker - ("\\.dockerfile$" all-the-icons-fileicon "dockerfile" :face all-the-icons-cyan) - - ;; Vagrant - ("\\.vagrantfile$" all-the-icons-fileicon "vagrant" :face all-the-icons-blue) - - ;; There seems to be a a bug with this font icon which does not - ;; let you propertise it without it reverting to being a lower - ;; case phi - ("\\.c$" all-the-icons-alltheicon "c-line" :face all-the-icons-blue) - ("\\.h$" all-the-icons-alltheicon "c-line" :face all-the-icons-purple) - ("\\.m$" all-the-icons-fileicon "apple" :v-adjust 0.0 :height 1.0) - ("\\.mm$" all-the-icons-fileicon "apple" :v-adjust 0.0 :height 1.0) - - ("\\.c\\(c\\|pp\\|xx\\)$" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-blue) - ("\\.h\\(h\\|pp\\|xx\\)$" all-the-icons-alltheicon "cplusplus-line" :v-adjust -0.2 :face all-the-icons-purple) - - ("\\.csx?$" all-the-icons-alltheicon "csharp-line" :face all-the-icons-dblue) - - ("\\.cljc?$" all-the-icons-alltheicon "clojure" :height 1.0 :face all-the-icons-blue :v-adjust 0.0) - ("\\.cljs$" all-the-icons-fileicon "cljs" :height 1.0 :face all-the-icons-dblue :v-adjust 0.0) - - ("\\.coffee$" all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-maroon) - ("\\.iced$" all-the-icons-alltheicon "coffeescript" :height 1.0 :face all-the-icons-lmaroon) - - ("\\.dart$" all-the-icons-fileicon "dart" :height 1.0 :face all-the-icons-blue :v-adjust 0.0) - ;; Git ("^MERGE_" all-the-icons-octicon "git-merge" :v-adjust 0.0 :face all-the-icons-red) ("^COMMIT_EDITMSG" all-the-icons-octicon "git-commit" :v-adjust 0.0 :face all-the-icons-red) - ;; Lisps - ("\\.cl$" all-the-icons-fileicon "clisp" :face all-the-icons-lorange) - ("\\.l\\(isp\\)?$" all-the-icons-fileicon "lisp" :face all-the-icons-orange) - ("\\.el$" all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face all-the-icons-purple) - ;; Stylesheeting - ("\\.css$" all-the-icons-alltheicon "css3" :face all-the-icons-yellow) - ("\\.scss$" all-the-icons-alltheicon "sass" :face all-the-icons-pink) - ("\\.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) - ("\\.postcss$" 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) ("stylelint" all-the-icons-fileicon "stylelint" :face all-the-icons-lyellow) - ("\\.csv$" all-the-icons-octicon "graph" :v-adjust 0.0 :face all-the-icons-dblue) - - ("\\.hs$" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) - ("\\.chs$" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) - ("\\.lhs$" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) - ("\\.hsc$" all-the-icons-alltheicon "haskell" :height 1.0 :face all-the-icons-red) - - ;; Web modes - ("\\.inky-haml$" all-the-icons-fileicon "haml" :face all-the-icons-lyellow) - ("\\.haml$" all-the-icons-fileicon "haml" :face all-the-icons-lyellow) - ("\\.html?$" all-the-icons-alltheicon "html5" :face all-the-icons-orange) - ("\\.inky-erb?$" all-the-icons-alltheicon "html5" :face all-the-icons-lred) - ("\\.erb$" all-the-icons-alltheicon "html5" :face all-the-icons-lred) - ("\\.hbs$" all-the-icons-fileicon "moustache" :face all-the-icons-green) - ("\\.inky-slim$" all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow) - ("\\.slim$" all-the-icons-octicon "dashboard" :v-adjust 0.0 :face all-the-icons-yellow) - ("\\.jade$" all-the-icons-fileicon "jade" :face all-the-icons-red) - ("\\.pug$" all-the-icons-fileicon "pug-alt" :face all-the-icons-red) - ;; JavaScript ("^gulpfile" all-the-icons-alltheicon "gulp" :height 1.0 :face all-the-icons-lred) ("^gruntfile" all-the-icons-alltheicon "grunt" :height 1.0 :v-adjust -0.1 :face all-the-icons-lyellow) ("^webpack" all-the-icons-fileicon "webpack" :face all-the-icons-lblue) - ("\\.d3\\.?js" all-the-icons-alltheicon "d3" :height 0.8 :face all-the-icons-lgreen) - - ("\\.re$" all-the-icons-fileicon "reason" :height 1.0 :face all-the-icons-red-alt) - ("\\.rei$" all-the-icons-fileicon "reason" :height 1.0 :face all-the-icons-dred) - ("\\.ml$" all-the-icons-fileicon "ocaml" :height 1.0 :face all-the-icons-lpink) - ("\\.mli$" all-the-icons-fileicon "ocaml" :height 1.0 :face all-the-icons-dpink) - - ("\\.react" all-the-icons-alltheicon "react" :height 1.1 :face all-the-icons-lblue) - ("\\.d\\.ts$" all-the-icons-fileicon "typescript" :height 1.0 :v-adjust -0.1 :face all-the-icons-cyan-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) - ("\\.es[0-9]$" 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) - ("\\.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) - - ;; F# - ("\\.fs[ix]?$" all-the-icons-fileicon "fsharp" :face all-the-icons-blue-alt) - - ;; File Types - ("\\.ico$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-blue) - ("\\.png$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-orange) - ("\\.gif$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-green) - ("\\.jpe?g$" all-the-icons-octicon "file-media" :v-adjust 0.0 :face all-the-icons-dblue) - ("\\.svg$" all-the-icons-alltheicon "svg" :height 0.9 :face all-the-icons-lgreen) - - ;; Video - ("\\.mov" all-the-icons-faicon "film" :face all-the-icons-blue) - ("\\.mp4" all-the-icons-faicon "film" :face all-the-icons-blue) - ("\\.ogv" all-the-icons-faicon "film" :face all-the-icons-dblue) - ("\\.mkv" all-the-icons-faicon "film" :face all-the-icons-blue) - ("\\.webm" all-the-icons-faicon "film" :face all-the-icons-blue) - - ;; Fonts - ("\\.ttf$" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-dcyan) - ("\\.woff2?$" all-the-icons-fileicon "font" :v-adjust 0.0 :face all-the-icons-cyan) - - ;; Doc - ("\\.pdf" all-the-icons-octicon "file-pdf" :v-adjust 0.0 :face all-the-icons-dred) - ("\\.te?xt" all-the-icons-octicon "file-text" :v-adjust 0.0 :face all-the-icons-cyan) - ("\\.doc[xm]?$" all-the-icons-fileicon "word" :face all-the-icons-blue) - ("\\.texi?$" 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) - ("\\.bib$" all-the-icons-fileicon "bib" :face all-the-icons-maroon) - ("\\.org$" all-the-icons-fileicon "org" :face all-the-icons-lgreen) - - ("\\.pp[st]$" all-the-icons-fileicon "powerpoint" :face all-the-icons-orange) - ("\\.pp[st]x$" all-the-icons-fileicon "powerpoint" :face all-the-icons-red) - ("\\.knt$" all-the-icons-fileicon "powerpoint" :face all-the-icons-cyan) - ("bookmark" all-the-icons-octicon "bookmark" :height 1.1 :v-adjust 0.0 :face all-the-icons-lpink) - ("\\.cache$" all-the-icons-octicon "database" :height 1.0 :v-adjust 0.0 :face all-the-icons-green) ("^\\*scratch\\*$" all-the-icons-faicon "sticky-note" :face all-the-icons-lyellow) ("^\\*scratch.*" all-the-icons-faicon "sticky-note" :face all-the-icons-yellow) @@ -501,6 +538,8 @@ (defvar all-the-icons-mode-icon-alist '( (emacs-lisp-mode all-the-icons-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face all-the-icons-purple) + (circe-server-mode all-the-icons-faicon "commenting-o" :height 1.0 :v-adjust 0.0) + (circe-channel-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) (dired-mode all-the-icons-octicon "file-directory" :v-adjust 0.0) @@ -526,7 +565,7 @@ (org-agenda-mode all-the-icons-octicon "checklist" :v-adjust 0.0 :face all-the-icons-lgreen) (cfw:calendar-mode all-the-icons-octicon "calendar" :v-adjust 0.0) (ibuffer-mode all-the-icons-faicon "files-o" :v-adjust 0.0 :face all-the-icons-dsilver) - (messages-buffer-mode all-the-icons-faicon "stack-overflow" :v-adjust -0.1) + (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) (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) @@ -537,8 +576,9 @@ (mu4e-headers-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) + (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) - (Custom-mode all-the-icons-octicon "settings") + (Custom-mode all-the-icons-octicon "settings" :v-adjust -0.1) ;; Special matcher for Web Mode based on the `web-mode-content-type' of the current buffer (web-mode all-the-icons--web-mode-icon) @@ -558,6 +598,7 @@ (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) (makefile-mode all-the-icons-fileicon "gnu" :face all-the-icons-dorange) + (cmake-mode all-the-icons-fileicon "cmake" :face all-the-icons-red) (dockerfile-mode all-the-icons-fileicon "dockerfile" :face all-the-icons-blue) (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) @@ -631,7 +672,17 @@ (latex-mode all-the-icons-fileicon "tex" :face all-the-icons-lred) (dart-mode all-the-icons-fileicon "dart" :height 1.0 :face all-the-icons-blue) (fsharp-mode all-the-icons-fileicon "fsharp" :height 1.0 :face all-the-icons-blue) - )) + (asm-mode all-the-icons-fileicon "assembly" :height 1.0 :face all-the-icons-blue) + (nasm-mode all-the-icons-fileicon "assembly" :height 1.0 :face all-the-icons-blue) + (tcl-mode all-the-icons-fileicon "tcl" :height 1.0 :face all-the-icons-dred) + (cuda-mode all-the-icons-fileicon "nvidia" :face all-the-icons-green) + (f90-mode all-the-icons-fileicon "fortran" :face all-the-icons-purple) + (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) + (zig-mode all-the-icons-fileicon "zig" :face all-the-icons-orange) + (pdf-view-mode all-the-icons-octicon "file-pdf" :v-adjust 0.0 :face all-the-icons-dred) + (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))) (defvar all-the-icons-url-alist '( @@ -655,7 +706,7 @@ ("tumblr\\.com" all-the-icons-faicon "tumblr") ("^wordpress\\.com" all-the-icons-faicon "wordpress") ;; Programming - ("^\\(https?://\\)?\\(www\\.\\)?bitbucket\\.org" all-the-icons-octicon "bitbucket") + ("^\\(https?://\\)?\\(www\\.\\)?bitbucket\\.org" all-the-icons-faicon "bitbucket") ("^\\(https?://\\)?\\(www\\.\\)?codepen\\.io" all-the-icons-faicon "codepen") ("^\\(https?://\\)?\\(www\\.\\)?codiepie\\.com" all-the-icons-faicon "codiepie") ("^\\(https?://\\)?\\(www\\.\\)?gist\\.github\\.com" all-the-icons-octicon "gist") @@ -836,7 +887,11 @@ Note: You want chevron, please use `all-the-icons-icon-for-dir-with-chevron'." ARG-OVERRIDES should be a plist containining `:height', `:v-adjust' or `:face' properties like in the normal icon inserting functions." - (let* ((icon (all-the-icons-match-to-alist file all-the-icons-icon-alist)) + (let* ((ext (file-name-extension file)) + (icon (or (and ext + (cdr (assoc (downcase ext) + all-the-icons-extension-icon-alist))) + (all-the-icons-match-to-alist file all-the-icons-regexp-icon-alist))) (args (cdr icon))) (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) (apply (car icon) args))) @@ -868,15 +923,36 @@ inserting functions." (when arg-overrides (setq args (append `(,(car args)) arg-overrides (cdr args)))) (apply (car icon) args))) -(memoize 'all-the-icons-icon-for-dir) -(memoize 'all-the-icons-icon-for-file) -(memoize 'all-the-icons-icon-for-mode) -(memoize 'all-the-icons-icon-for-url) +(defcustom all-the-icons--cache-limit 2048 + "Maximum cache size for functions cached by `all-the-icons-cache'." + :type 'integer) + +(defun all-the-icons-cache (func) + "Set a cache for FUNC. Does not work on interactive functions." + (unless (get func 'all-the-icons--cached) + (let ((cache (make-hash-table :test #'equal + :size all-the-icons--cache-limit)) + (orig-fn (symbol-function func))) + (fset func + (lambda (&rest args) + (or (gethash args cache) + (progn + (when (> (hash-table-count cache) + all-the-icons--cache-limit) + (clrhash cache)) + (puthash args (apply orig-fn args) cache))))))) + + (put func 'all-the-icons--cached t)) + +(all-the-icons-cache #'all-the-icons-icon-for-dir) +(all-the-icons-cache #'all-the-icons-icon-for-file) +(all-the-icons-cache #'all-the-icons-icon-for-mode) +(all-the-icons-cache #'all-the-icons-icon-for-url) ;; Family Face Functions (defun all-the-icons-icon-family-for-file (file) "Get the icons font family for FILE." - (let ((icon (all-the-icons-match-to-alist file all-the-icons-icon-alist))) + (let ((icon (all-the-icons-match-to-alist file all-the-icons-regexp-icon-alist))) (funcall (intern (format "%s-family" (car icon)))))) (defun all-the-icons-icon-family-for-mode (mode) @@ -888,9 +964,9 @@ inserting functions." "Get a propertized ICON family programmatically." (plist-get (get-text-property 0 'face icon) :family)) -(memoize 'all-the-icons-icon-family-for-file) -(memoize 'all-the-icons-icon-family-for-mode) -(memoize 'all-the-icons-icon-family) +(all-the-icons-cache #'all-the-icons-icon-family-for-file) +(all-the-icons-cache #'all-the-icons-icon-family-for-mode) +(all-the-icons-cache #'all-the-icons-icon-family) (defun all-the-icons--icon-info-for-buffer (&optional f) "Get icon info for the current buffer. @@ -969,12 +1045,15 @@ When PFX is non-nil, ignore the prompt and just install" (interactive "P") (when (or pfx (yes-or-no-p "This will download and install fonts, are you sure you want to do this?")) (let* ((url-format "https://raw.githubusercontent.com/domtronn/all-the-icons.el/master/fonts/%s") - (font-dest (cl-case window-system - (x (concat (or (getenv "XDG_DATA_HOME") ;; Default Linux install directories - (concat (getenv "HOME") "/.local/share")) - "/fonts/")) - (mac (concat (getenv "HOME") "/Library/Fonts/" )) - (ns (concat (getenv "HOME") "/Library/Fonts/" )))) ;; Default MacOS install directory + (font-dest (cond + ;; Default Linux install directories + ((member system-type '(gnu gnu/linux gnu/kfreebsd)) + (concat (or (getenv "XDG_DATA_HOME") + (concat (getenv "HOME") "/.local/share")) + "/fonts/")) + ;; Default MacOS install directory + ((eq system-type 'darwin) + (concat (getenv "HOME") "/Library/Fonts/")))) (known-dest? (stringp font-dest)) (font-dest (or font-dest (read-directory-name "Font installation directory: " "~/")))) @@ -1045,12 +1124,12 @@ FONT-NAME is the name of the .ttf file providing the font, defaults to FAMILY." (add-to-list 'all-the-icons-font-families (quote ,name)) (add-to-list 'all-the-icons-font-names (quote ,(downcase (format "%s.ttf" (or font-name family))))) (defcustom ,(all-the-icons--family-scale-factor name) 1.0 - ,(format "The additional Scale Factor for the `height' face property of all %s icons." + ,(format "The additional `height' face property Scale Factor for %s icons." (symbol-name name)) :group 'all-the-icons :type 'number) (defcustom ,(all-the-icons--family-adjust name) 0.0 - ,(format "The additional adjustment to be made to the `raise' display property of all %s icons." + ,(format "The additional `raise' display property adjustment for %s icons." (symbol-name name)) :group 'all-the-icons :type 'number) diff --git a/lisp/all-the-icons/data/data-fileicons.el b/lisp/all-the-icons/data/data-fileicons.el index 200cf853..df91ac47 100644 --- a/lisp/all-the-icons/data/data-fileicons.el +++ b/lisp/all-the-icons/data/data-fileicons.el @@ -34,6 +34,7 @@ ( "arduino" . "\xe930" ) ( "arttext" . "\x24d0" ) ( "asciidoc" . "\xe918" ) + ( "assembly" . "\xEB4F" ) ( "ats" . "\xe934" ) ( "audacity" . "\xe9f9" ) ( "augeas" . "\xe931" ) @@ -322,7 +323,7 @@ ( "pawn" . "\x265f" ) ( "pb" . "\xea14" ) ( "pegjs" . "\xea74" ) - ( "perl6" . "\xe96c" ) + ( "raku" . "\xe96c" ) ( "phalcon" . "\xe94a" ) ( "phoenix" . "\xea5f" ) ( "php" . "\xf147" ) @@ -481,6 +482,7 @@ ( "yui" . "\xea00" ) ( "zbrush" . "\xe9f2" ) ( "zephir" . "\xe9c7" ) + ("zig" . "\x7A") ( "zimpl" . "\xe9c8" ) ) diff --git a/lisp/amx.el b/lisp/amx.el index 1d795d24..ede40a97 100644 --- a/lisp/amx.el +++ b/lisp/amx.el @@ -8,11 +8,11 @@ ;; Cornelius Mika ;; Maintainer: Ryan C. Thompson ;; URL: http://github.com/DarwinAwardWinner/amx/ -;; Package-Version: 20210101.1921 -;; Package-Commit: b99149715266b5c2c48f5a0fc43716d36575da5f +;; Package-Version: 20210305.118 +;; Package-Commit: 37f9c7ae55eb0331b27200fb745206fc58ceffc0 ;; Package-Requires: ((emacs "24.4") (s "0")) -;; Version: 3.3 -;; Keywords: convenience, usability +;; Version: 3.4 +;; Keywords: convenience, usability, completion ;; This file is not part of GNU Emacs. @@ -494,7 +494,7 @@ A backend must be defined with at least a `:name' and a `:comp-fun' must accept the same arguments as `amx-completing-read-default'. -Additionally, a backend muse declare a `:get-text-fun', unless +Additionally, a backend must declare a `:get-text-fun', unless `amx-default-get-text' is sufficient to get the user's currently entered text for the backend. Similarly, if pressing RET is not the correct way to exit the minibuffer with the currently @@ -537,7 +537,7 @@ choose the backend." (t (error "Unknown amx backed %S" backend)))) (cl-defun amx-completing-read-default (choices &key initial-input predicate def) - "Amx backend for default Emacs completion" + "Amx backend for default Emacs completion." (amx--debug-message "Preparing default-style completion") (require 'minibuf-eldef) (let ((minibuffer-completion-table choices) @@ -573,7 +573,7 @@ May not work for things like ido and ivy." (declare-function ido-completing-read+ "ext:ido-completing-read+") (cl-defun amx-completing-read-ido (choices &key initial-input predicate def) - "Amx backend for ido completion" + "Amx backend for ido completion." (require 'ido-completing-read+) (let ((ido-completion-map ido-completion-map) (ido-setup-hook (cons 'amx-prepare-ido-bindings ido-setup-hook)) @@ -596,7 +596,7 @@ May not work for things like ido and ivy." (declare-function ivy-read "ext:ivy") (cl-defun amx-completing-read-ivy (choices &key initial-input predicate def) - "Amx backend for ivy completion" + "Amx backend for ivy completion." (require 'ivy) (ivy-read (amx-prompt-with-prefix-arg) choices :predicate predicate @@ -621,7 +621,7 @@ May not work for things like ido and ivy." (declare-function helm-comp-read "ext:helm-mode") (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-mode) ; Provides `helm-comp-read-map' (helm-comp-read (amx-prompt-with-prefix-arg) choices @@ -645,34 +645,32 @@ May not work for things like ido and ivy." :required-feature 'helm :auto-activate '(bound-and-true-p helm-mode)) -(declare-function selectrum-read "ext:selectrum") -(declare-function selectrum--normalize-collection "ext:selectrum") +(declare-function selectrum-completing-read "ext:selectrum") +(defvar selectrum-should-sort) (defvar selectrum-should-sort-p) -(defvar selectrum--previous-input-string) (cl-defun amx-completing-read-selectrum (choices &key initial-input predicate def) "Amx backend for selectrum completion." - (let ((choices (cl-remove-if-not (or predicate #'identity) - choices)) - (selectrum-should-sort-p nil)) - (minibuffer-with-setup-hook - (lambda () - (use-local-map (make-composed-keymap - (list amx-map (current-local-map))))) - (selectrum-read (amx-prompt-with-prefix-arg) - (selectrum--normalize-collection choices) - :history 'extended-command-history - :require-match t - :default-candidate def - :initial-input initial-input)))) - -(defun amx-selectrum-get-text () - selectrum--previous-input-string) + (minibuffer-with-setup-hook + (lambda () + (setq-local selectrum-should-sort nil) + (use-local-map (make-composed-keymap + (list amx-map (current-local-map))))) + ;; FIXME: `selectrum-should-sort-p' should be removed after it can be + ;; assumed all amx users updated also Selectrum. + (let ((selectrum-should-sort-p nil)) + (selectrum-completing-read (amx-prompt-with-prefix-arg) + choices + predicate + t + initial-input + 'extended-command-history + def)))) (amx-define-backend :name 'selectrum :comp-fun 'amx-completing-read-selectrum - :get-text-fun 'amx-selectrum-get-text + :get-text-fun 'amx-default-get-text :required-feature 'selectrum :auto-activate '(bound-and-true-p selectrum-mode)) @@ -747,18 +745,17 @@ the associated feature, if any." (set-default symbol value)) (defcustom amx-backend 'auto - "Completion function to select a candidate from a list of strings. + "Completion backend used by amx. -This function should take the same arguments as -`amx-completing-read': CHOICES and INITIAL-INPUT. - -By default, an appropriate method is selected based on whether -`ivy-mode' or `ido-mode' is enabled." +This should be the name of backend defined using +`amx-define-backend', such as `ido' or `ivy', or the symbol +`auto' to have amx select a backend automatically." :type '(choice (const :tag "Auto-select" auto) (const :tag "Ido" ido) (const :tag "Ivy" ivy) (const :tag "Helm" helm) + (const :tag "Selectrum" selectrum) (const :tag "Standard" standard) (symbol :tag "Custom backend")) :set #'amx-set-backend) diff --git a/lisp/anaconda-mode/anaconda-mode-pkg.el b/lisp/anaconda-mode/anaconda-mode-pkg.el new file mode 100644 index 00000000..bff291f7 --- /dev/null +++ b/lisp/anaconda-mode/anaconda-mode-pkg.el @@ -0,0 +1,14 @@ +(define-package "anaconda-mode" "20211122.817" "Code navigation, documentation lookup and completion for Python" + '((emacs "25.1") + (pythonic "0.1.0") + (dash "2.6.0") + (s "1.9") + (f "0.16.2")) + :commit "cbea0fb3182321d34ff93981c5a59f8dd72d82a5" :authors + '(("Artem Malyshev" . "proofit404@gmail.com")) + :maintainer + '("Artem Malyshev" . "proofit404@gmail.com") + :url "https://github.com/proofit404/anaconda-mode") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/lisp/anaconda-mode.el b/lisp/anaconda-mode/anaconda-mode.el similarity index 84% rename from lisp/anaconda-mode.el rename to lisp/anaconda-mode/anaconda-mode.el index b7638fa8..3c78deed 100644 --- a/lisp/anaconda-mode.el +++ b/lisp/anaconda-mode/anaconda-mode.el @@ -4,9 +4,7 @@ ;; Author: Artem Malyshev ;; URL: https://github.com/proofit404/anaconda-mode -;; Package-Version: 20200912.239 -;; Package-Commit: 39b1cf88c8c459901630d248d6135d8644075648 -;; Version: 0.1.13 +;; Version: 0.1.15 ;; Package-Requires: ((emacs "25.1") (pythonic "0.1.0") (dash "2.6.0") (s "1.9") (f "0.16.2")) ;; This program is free software; you can redistribute it and/or modify @@ -87,177 +85,9 @@ (declare-function posframe-show "posframe") ;;; Server. -(defvar anaconda-mode-server-version "0.1.13" +(defvar anaconda-mode-server-version "0.1.15" "Server version needed to run `anaconda-mode'.") -(defvar anaconda-mode-server-command " -from __future__ import print_function - -# CLI arguments. - -import sys - -assert len(sys.argv) > 3, 'CLI arguments: %s' % sys.argv - -server_directory = sys.argv[-3] -server_address = sys.argv[-2] -virtual_environment = sys.argv[-1] - -# Ensure directory. - -import os - -server_directory = os.path.expanduser(server_directory) -virtual_environment = os.path.expanduser(virtual_environment) - -if not os.path.exists(server_directory): - os.makedirs(server_directory) - -# Installation check. - -jedi_dep = ('jedi', '0.13.0') -service_factory_dep = ('service_factory', '0.1.5') - -missing_dependencies = [] - -def instrument_installation(): - for package in (jedi_dep, service_factory_dep): - package_is_installed = False - for path in os.listdir(server_directory): - path = os.path.join(server_directory, path) - if path.endswith('.egg') and os.path.isdir(path): - if path not in sys.path: - sys.path.insert(0, path) - if package[0] in path: - package_is_installed = True - if not package_is_installed: - missing_dependencies.append('>='.join(package)) - -instrument_installation() - -# Installation. - -def install_deps(): - import site - import setuptools.command.easy_install - site.addsitedir(server_directory) - cmd = ['--install-dir', server_directory, - '--site-dirs', server_directory, - '--always-copy','--always-unzip'] - cmd.extend(missing_dependencies) - setuptools.command.easy_install.main(cmd) - instrument_installation() - -if missing_dependencies: - install_deps() - -del missing_dependencies[:] - -try: - import jedi -except ImportError: - missing_dependencies.append('>='.join(jedi_dep)) - -try: - import service_factory -except ImportError: - missing_dependencies.append('>='.join(service_factory_dep)) - -# Try one more time in case if anaconda installation gets broken somehow -if missing_dependencies: - install_deps() - import jedi - import service_factory - -# Setup server. - -assert jedi.__version__ >= jedi_dep[1], 'Jedi version should be >= %s, current version: %s' % (jedi_dep[1], jedi.__version__,) - -if virtual_environment: - virtual_environment = jedi.create_environment(virtual_environment, safe=False) -else: - virtual_environment = None - -# Define JSON-RPC application. - -import functools -import threading - -def script_method(f): - @functools.wraps(f) - def wrapper(source, line, column, path): - timer = threading.Timer(30.0, sys.exit) - timer.start() - result = f(jedi.Script(source, line, column, path, environment=virtual_environment)) - timer.cancel() - return result - return wrapper - -def process_definitions(f): - @functools.wraps(f) - def wrapper(script): - definitions = f(script) - if len(definitions) == 1 and not definitions[0].module_path: - return '%s is defined in %s compiled module' % ( - definitions[0].name, definitions[0].module_name) - return [[definition.module_path, - definition.line, - definition.column, - definition.get_line_code().strip()] - for definition in definitions - if definition.module_path] or None - return wrapper - -@script_method -def complete(script): - return [[definition.name, definition.type] - for definition in script.completions()] - -@script_method -def company_complete(script): - return [[definition.name, - definition.type, - definition.docstring(), - definition.module_path, - definition.line] - for definition in script.completions()] - -@script_method -def show_doc(script): - return [[definition.module_name, definition.docstring()] - for definition in script.goto_definitions()] - -@script_method -@process_definitions -def goto_definitions(script): - return script.goto_definitions() - -@script_method -@process_definitions -def goto_assignments(script): - return script.goto_assignments() - -@script_method -@process_definitions -def usages(script): - return script.usages() - -@script_method -def eldoc(script): - signatures = script.call_signatures() - if len(signatures) == 1: - signature = signatures[0] - return [signature.name, - signature.index, - [param.description[6:] for param in signature.params]] - -# Run. - -app = [complete, company_complete, show_doc, goto_definitions, goto_assignments, usages, eldoc] - -service_factory.service_factory(app, server_address, 0, 'anaconda_mode port {port}') -" "Run `anaconda-mode' server.") - (defvar anaconda-mode-process-name "anaconda-mode" "Process name for `anaconda-mode' processes.") @@ -396,6 +226,32 @@ This function creates that directory if it doesn't exist yet." (make-directory anaconda-mode-installation-directory t)) anaconda-mode-installation-directory)) +(defun anaconda-mode-server-command-args () + "Return list of arguments to start anaconda-mode server. + +Passes local file anaconda-mode.py if local, or uses python +module as string if connecting through TRAMP. + +Arguments are: +1. anaconda-mode.py (local) or -c anaconda-mode.py string (remote) +2. anaconda-mode-server-directory +3. anaconda-mode-localhost-address (local) or 0.0.0.0 (remote) +4. python-shell-virtualenv-root or empty string if not set" + (let ((server-command-file (concat (file-name-directory (locate-library "anaconda-mode")) "anaconda-mode.py")) + (arg-list (list (anaconda-mode-server-directory) + (if (pythonic-remote-p) + "0.0.0.0" + anaconda-mode-localhost-address) + (or python-shell-virtualenv-root "") )) + server-command) + (if (pythonic-remote-p) + (with-temp-buffer + (insert-file-contents server-command-file) + (setq server-command (list "-c" (buffer-string)))) + (setq server-command (list server-command-file))) + (append server-command arg-list))) + + (defun anaconda-mode-bootstrap (&optional callback) "Run `anaconda-mode' server. CALLBACK function will be called when `anaconda-mode-port' will @@ -408,13 +264,7 @@ be bound." :filter (lambda (process output) (anaconda-mode-bootstrap-filter process output callback)) :sentinel (lambda (_process _event)) - :args `("-c" - ,anaconda-mode-server-command - ,(anaconda-mode-server-directory) - ,(if (pythonic-remote-p) - "0.0.0.0" - anaconda-mode-localhost-address) - ,(or python-shell-virtualenv-root "")))) + :args (anaconda-mode-server-command-args))) (process-put anaconda-mode-process 'interpreter python-shell-interpreter) (process-put anaconda-mode-process 'virtualenv python-shell-virtualenv-root) (process-put anaconda-mode-process 'port nil) @@ -594,7 +444,9 @@ number position, column number position and file path." (let ((result (cdr (assoc 'result response)))) ;; Terminate `apply' call with empty list so response ;; will be treated as single argument. - (apply callback result nil))))))) + (condition-case nil + (apply callback result nil) + (quit nil)))))))) (kill-buffer http-buffer)))))) @@ -699,7 +551,7 @@ number position, column number position and file path." "Find definitions for thing at point." (interactive) (anaconda-mode-call - "goto_definitions" + "infer" (lambda (result) (anaconda-mode-show-xrefs result nil "No definitions found")))) @@ -707,7 +559,7 @@ number position, column number position and file path." "Find definitions for thing at point." (interactive) (anaconda-mode-call - "goto_definitions" + "infer" (lambda (result) (anaconda-mode-show-xrefs result 'window "No definitions found")))) @@ -715,7 +567,7 @@ number position, column number position and file path." "Find definitions for thing at point." (interactive) (anaconda-mode-call - "goto_definitions" + "infer" (lambda (result) (anaconda-mode-show-xrefs result 'frame "No definitions found")))) @@ -726,7 +578,7 @@ number position, column number position and file path." "Find assignments for thing at point." (interactive) (anaconda-mode-call - "goto_assignments" + "goto" (lambda (result) (anaconda-mode-show-xrefs result nil "No assignments found")))) @@ -734,7 +586,7 @@ number position, column number position and file path." "Find assignments for thing at point." (interactive) (anaconda-mode-call - "goto_assignments" + "goto" (lambda (result) (anaconda-mode-show-xrefs result 'window "No assignments found")))) @@ -742,7 +594,7 @@ number position, column number position and file path." "Find assignments for thing at point." (interactive) (anaconda-mode-call - "goto_assignments" + "goto" (lambda (result) (anaconda-mode-show-xrefs result 'frame "No assignments found")))) @@ -753,7 +605,7 @@ number position, column number position and file path." "Find references for thing at point." (interactive) (anaconda-mode-call - "usages" + "get_references" (lambda (result) (anaconda-mode-show-xrefs result nil "No references found")))) @@ -761,7 +613,7 @@ number position, column number position and file path." "Find references for thing at point." (interactive) (anaconda-mode-call - "usages" + "get_references" (lambda (result) (anaconda-mode-show-xrefs result 'window "No references found")))) @@ -769,7 +621,7 @@ number position, column number position and file path." "Find references for thing at point." (interactive) (anaconda-mode-call - "usages" + "get_references" (lambda (result) (anaconda-mode-show-xrefs result 'frame "No references found")))) @@ -783,7 +635,7 @@ number position, column number position and file path." (cl-defmethod xref-backend-definitions ((_backend (eql anaconda)) _identifier) "Find definitions for thing at point." (anaconda-mode-call-sync - "goto_definitions" + "infer" (lambda (result) (if result (if (stringp result) @@ -795,7 +647,7 @@ number position, column number position and file path." (cl-defmethod xref-backend-references ((_backend (eql anaconda)) _identifier) "Find references for thing at point." (anaconda-mode-call-sync - "usages" + "get_references" (lambda (result) (if result (if (stringp result) diff --git a/lisp/anaconda-mode/anaconda-mode.py b/lisp/anaconda-mode/anaconda-mode.py new file mode 100644 index 00000000..5b3132bb --- /dev/null +++ b/lisp/anaconda-mode/anaconda-mode.py @@ -0,0 +1,194 @@ + +from __future__ import print_function +import sys +import os +from distutils.version import LooseVersion + +# CLI arguments. + +assert len(sys.argv) > 3, 'CLI arguments: %s' % sys.argv + +server_directory = sys.argv[-3] +server_address = sys.argv[-2] +virtual_environment = sys.argv[-1] + +# Ensure directory. + +server_directory = os.path.expanduser(server_directory) +virtual_environment = os.path.expanduser(virtual_environment) + +# Installation check. + +IS_PY2 = sys.version_info[0] == 2 + +# jedi versions >= 0.18 don't support Python 2 +if IS_PY2: + jedi_dep = ('jedi', '0.17.2') + server_directory += '-py2' +else: + jedi_dep = ('jedi', '0.18.1') + server_directory += '-py3' +service_factory_dep = ('service_factory', '0.1.6') + +if not os.path.exists(server_directory): + os.makedirs(server_directory) +sys.path.insert(1, server_directory) + +missing_dependencies = [] + + +def is_package_dir(path): + if os.path.isdir(path): + if IS_PY2: + return path.endswith(".egg") + else: + return not (path.endswith(".dist-info") or path.endswith(".egg-info")) + return False + +def instrument_installation(): + for package in (jedi_dep, service_factory_dep): + package_is_installed = False + for path in os.listdir(server_directory): + path = os.path.join(server_directory, path) + if is_package_dir(path): + if path not in sys.path: + sys.path.insert(0, path) + if package[0] in path: + package_is_installed = True + if not package_is_installed: + missing_dependencies.append('=='.join(package)) + +instrument_installation() + +# Installation. + +def install_deps_setuptools(): + import setuptools.command.easy_install + cmd = ['--install-dir', server_directory, + '--site-dirs', server_directory, + '--always-copy', '--always-unzip'] + cmd.extend(missing_dependencies) + setuptools.command.easy_install.main(cmd) + instrument_installation() + +def install_deps_pip(): + import subprocess + cmd = [sys.executable, '-m', 'pip', 'install', '--target', server_directory] + cmd.extend(missing_dependencies) + subprocess.check_call(cmd) + instrument_installation() + +if missing_dependencies: + if IS_PY2: + install_deps_setuptools() + else: + install_deps_pip() + +del missing_dependencies[:] + +try: + import jedi +except ImportError: + missing_dependencies.append('=='.join(jedi_dep)) + +try: + import service_factory +except ImportError: + missing_dependencies.append('>='.join(service_factory_dep)) + +# Try one more time in case if anaconda installation gets broken somehow +if missing_dependencies: + if IS_PY2: + install_deps_setuptools() + else: + install_deps_pip() + import jedi + import service_factory + +# Setup server. + +assert LooseVersion(jedi.__version__) >= LooseVersion(jedi_dep[1]), 'Jedi version should be >= %s, current version: %s' % (jedi_dep[1], jedi.__version__) + +if virtual_environment: + virtual_environment = jedi.create_environment(virtual_environment, safe=False) +else: + virtual_environment = None + +# Define JSON-RPC application. + +import functools +import threading + +def script_method(f): + @functools.wraps(f) + def wrapper(source, line, column, path): + timer = threading.Timer(30.0, sys.exit) + timer.start() + result = f(jedi.Script(source, path=path, environment=virtual_environment), line, column) + timer.cancel() + return result + return wrapper + +def process_definitions(f): + @functools.wraps(f) + def wrapper(script, line, column): + definitions = f(script, line, column) + if len(definitions) == 1 and not definitions[0].module_path: + return '%s is defined in %s compiled module' % ( + definitions[0].name, definitions[0].module_name) + return [[str(definition.module_path), + definition.line, + definition.column, + definition.get_line_code().strip()] + for definition in definitions + if definition.module_path] or None + return wrapper + +@script_method +def complete(script, line, column): + return [[definition.name, definition.type] + for definition in script.complete(line, column)] + +@script_method +def company_complete(script, line, column): + return [[definition.name, + definition.type, + definition.docstring(), + str(definition.module_path), + definition.line] + for definition in script.complete(line, column)] + +@script_method +def show_doc(script, line, column): + return [[definition.module_name, definition.docstring()] + for definition in script.infer(line, column)] + +@script_method +@process_definitions +def infer(script, line, column): + return script.infer(line, column) + +@script_method +@process_definitions +def goto(script, line, column): + return script.goto(line, column) + +@script_method +@process_definitions +def get_references(script, line, column): + return script.get_references(line, column) + +@script_method +def eldoc(script, line, column): + signatures = script.get_signatures(line, column) + if len(signatures) == 1: + signature = signatures[0] + return [signature.name, + signature.index, + [param.description[6:] for param in signature.params]] + +# Run. + +app = [complete, company_complete, show_doc, infer, goto, get_references, eldoc] + +service_factory.service_factory(app, server_address, 0, 'anaconda_mode port {port}') diff --git a/lisp/async/async-bytecomp.el b/lisp/async/async-bytecomp.el index 430d196b..8ca7c363 100644 --- a/lisp/async/async-bytecomp.el +++ b/lisp/async/async-bytecomp.el @@ -1,6 +1,6 @@ ;;; async-bytecomp.el --- Compile elisp files asynchronously -*- lexical-binding: t -*- -;; Copyright (C) 2014-2016 Free Software Foundation, Inc. +;; Copyright (C) 2014-2019 Free Software Foundation, Inc. ;; Authors: John Wiegley ;; Thierry Volpiatto @@ -41,6 +41,9 @@ (require 'cl-lib) (require 'async) +(declare-function package-desc-name "package.el") +(declare-function package-desc-dir "package.el") + (defcustom async-bytecomp-allowed-packages 'all "Packages in this list will be compiled asynchronously by `package--compile'. All the dependencies of these packages will be compiled async too, @@ -91,7 +94,7 @@ All *.elc files are systematically deleted before proceeding." (async-start `(lambda () (require 'bytecomp) - ,(async-inject-variables "\\`\\(load-path\\)\\|byte\\'") + ,(async-inject-variables "\\`\\(?:load-path\\'\\|byte-\\)") (let ((default-directory (file-name-as-directory ,directory)) error-data) (add-to-list 'load-path default-directory) @@ -128,13 +131,15 @@ All *.elc files are systematically deleted before proceeding." pkgs))))))) seen)) -(defadvice package--compile (around byte-compile-async) +(defun async--package-compile (orig-fun pkg-desc &rest args) (let ((cur-package (package-desc-name pkg-desc)) (pkg-dir (package-desc-dir pkg-desc))) (if (or (member async-bytecomp-allowed-packages '(t all (all))) (memq cur-package (async-bytecomp--get-package-deps async-bytecomp-allowed-packages))) (progn + ;; FIXME: Why do we use (eq cur-package 'async) once + ;; and (string= cur-package "async") afterwards? (when (eq cur-package 'async) (fmakunbound 'async-byte-recompile-directory)) ;; Add to `load-path' the latest version of async and @@ -145,7 +150,7 @@ All *.elc files are systematically deleted before proceeding." ;; `async-byte-recompile-directory' will add directory ;; as needed to `load-path'. (async-byte-recompile-directory (package-desc-dir pkg-desc) t)) - ad-do-it))) + (apply orig-fun pkg-desc args)))) ;;;###autoload (define-minor-mode async-bytecomp-package-mode @@ -155,8 +160,8 @@ Async compilation of packages can be controlled by :group 'async :global t (if async-bytecomp-package-mode - (ad-activate 'package--compile) - (ad-deactivate 'package--compile))) + (advice-add 'package--compile :around #'async--package-compile) + (advice-remove 'package--compile #'async--package-compile))) ;;;###autoload (defun async-byte-compile-file (file) diff --git a/lisp/async/async-pkg.el b/lisp/async/async-pkg.el index 19b84371..f55c5b1d 100644 --- a/lisp/async/async-pkg.el +++ b/lisp/async/async-pkg.el @@ -1,11 +1,11 @@ -(define-package "async" "20200809.501" "Asynchronous processing in Emacs" - '((emacs "24.3")) - :commit "14f48de586b0977e3470f053b810d77b07ea427a" :authors +(define-package "async" "20210823.528" "Asynchronous processing in Emacs" + '((emacs "24.4")) + :commit "fd7a9fca4a7bd0690e2e7e209397f493194e4f12" :authors '(("John Wiegley" . "jwiegley@gmail.com")) :maintainer '("John Wiegley" . "jwiegley@gmail.com") :keywords - '("convenience" "async") + '("async") :url "https://github.com/jwiegley/emacs-async") ;; Local Variables: ;; no-byte-compile: t diff --git a/lisp/async/async.el b/lisp/async/async.el index 6437a301..a8455b69 100644 --- a/lisp/async/async.el +++ b/lisp/async/async.el @@ -1,13 +1,14 @@ -;;; async.el --- Asynchronous processing -*- lexical-binding: t -*- +;;; async.el --- Asynchronous processing in Emacs -*- lexical-binding: t -*- -;; Copyright (C) 2012-2016 Free Software Foundation, Inc. +;; Copyright (C) 2012-2019 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Created: 18 Jun 2012 -;; Version: 1.9.4 -;; Package-Requires: ((emacs "24.3")) -;; Keywords: convenience async -;; URL: https://github.com/jwiegley/emacs-async +;; Version: 1.9.5 +;; Package-Requires: ((emacs "24.4")) + +;; Keywords: async +;; X-URL: https://github.com/jwiegley/emacs-async ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -39,7 +40,6 @@ (defcustom async-variables-noprops-function #'async--purecopy "Default function to remove text properties in variables." - :group 'async :type 'function) (defvar async-debug nil) @@ -100,14 +100,14 @@ variable's value with `async-variables-noprops-function'. It is intended to be used as follows: (async-start - `(lambda () - (require 'smtpmail) + \\=`(lambda () + (require \\='smtpmail) (with-temp-buffer (insert ,(buffer-substring-no-properties (point-min) (point-max))) ;; Pass in the variable environment for smtpmail - ,(async-inject-variables \"\\`\\(smtpmail\\|\\(user-\\)?mail\\)-\") + ,(async-inject-variables \"\\\\=`\\(smtpmail\\|\\(user-\\)?mail\\)-\") (smtpmail-send-it))) - 'ignore)" + \\='ignore)" `(setq ,@(let (bindings) (mapatoms @@ -164,6 +164,19 @@ It is intended to be used as follows: (kill-buffer (current-buffer)))) (set (make-local-variable 'async-callback-value) proc) (set (make-local-variable 'async-callback-value-set) t)) + ;; Maybe strip out unreadable "#"; They are replaced by + ;; empty string unless they are prefixing a special + ;; object like a marker. See issue #145. + (goto-char (point-min)) + (save-excursion + ;; Transform markers in list like + ;; (marker (moves after insertion) at 2338 in + ;; test\.org) so that remap text properties function + ;; can parse it to restitute marker. + (while (re-search-forward "#<\\([^>]*\\)>" nil t) + (replace-match (concat "(" (match-string 1) ")") t t))) + (while (re-search-forward "#(" nil t) + (replace-match "(" t t)) (goto-char (point-max)) (backward-sexp) (async-handle-result async-callback (read (current-buffer)) @@ -175,8 +188,11 @@ It is intended to be used as follows: (set (make-local-variable 'async-callback-value-set) t)))))) (defun async--receive-sexp (&optional stream) - (let ((sexp (decode-coding-string (base64-decode-string - (read stream)) 'utf-8-auto)) + ;; FIXME: Why use `utf-8-auto' instead of `utf-8-unix'? This is + ;; a communication channel over which we have complete control, + ;; so we get to choose exactly which encoding and EOL we use, isn't it? + (let ((sexp (decode-coding-string (base64-decode-string (read stream)) + 'utf-8-auto)) ;; Parent expects UTF-8 encoded text. (coding-system-for-write 'utf-8-auto)) (if async-debug @@ -184,7 +200,7 @@ It is intended to be used as follows: (setq sexp (read sexp)) (if async-debug (message "Read sexp {{{%s}}}" (pp-to-string sexp))) - (eval sexp))) + (eval sexp t))) (defun async--insert-sexp (sexp) (let (print-level @@ -226,8 +242,7 @@ It is intended to be used as follows: (defun async-ready (future) "Query a FUTURE to see if it is ready. -I.e., if no blocking -would result from a call to `async-get' on that FUTURE." +I.e., if no blocking would result from a call to `async-get' on that FUTURE." (and (memq (process-status future) '(exit signal)) (let ((buf (process-buffer future))) (if (buffer-live-p buf) @@ -333,7 +348,18 @@ will leave *emacs* process buffers hanging around): (async-start (lambda () (delete-file \"a remote file on a slow link\" nil)) - 'ignore) + \\='ignore) + +Special case: +If the output of START-FUNC is a string with properties +e.g. (buffer-string) RESULT will be transformed in a list where the +car is the string itself (without props) and the cdr the rest of +properties, this allows using in FINISH-FUNC the string without +properties and then apply the properties in cdr to this string (if +needed). +Properties handling special objects like markers are returned as +list to allow restoring them later. +See for more infos. Note: Even when FINISH-FUNC is present, a future is still returned except that it yields no value (since the value is diff --git a/lisp/async/dired-async.el b/lisp/async/dired-async.el index 1dba956b..91b705d4 100644 --- a/lisp/async/dired-async.el +++ b/lisp/async/dired-async.el @@ -1,6 +1,6 @@ ;;; dired-async.el --- Asynchronous dired actions -*- lexical-binding: t -*- -;; Copyright (C) 2012-2016 Free Software Foundation, Inc. +;; Copyright (C) 2012-2019 Free Software Foundation, Inc. ;; Authors: John Wiegley ;; Thierry Volpiatto @@ -52,46 +52,38 @@ (defcustom dired-async-env-variables-regexp "\\`\\(tramp-\\(default\\|connection\\|remote\\)\\|ange-ftp\\)-.*" "Variables matching this regexp will be loaded on Child Emacs." - :type 'regexp - :group 'dired-async) + :type 'regexp) (defcustom dired-async-message-function 'dired-async-mode-line-message "Function to use to notify result when operation finish. Should take same args as `message'." - :group 'dired-async :type 'function) (defcustom dired-async-log-file "/tmp/dired-async.log" "File use to communicate errors from Child Emacs to host Emacs." - :group 'dired-async :type 'string) (defcustom dired-async-mode-lighter '(:eval (when (eq major-mode 'dired-mode) " Async")) "Mode line lighter used for `dired-async-mode'." - :group 'dired-async :risky t :type 'sexp) (defface dired-async-message - '((t (:foreground "yellow"))) - "Face used for mode-line message." - :group 'dired-async) + '((t (:foreground "yellow"))) + "Face used for mode-line message.") (defface dired-async-failures - '((t (:foreground "red"))) - "Face used for mode-line message." - :group 'dired-async) + '((t (:foreground "red"))) + "Face used for mode-line message.") (defface dired-async-mode-message - '((t (:foreground "Gold"))) - "Face used for `dired-async--modeline-mode' lighter." - :group 'dired-async) + '((t (:foreground "Gold"))) + "Face used for `dired-async--modeline-mode' lighter.") (define-minor-mode dired-async--modeline-mode - "Notify mode-line that an async process run." - :group 'dired-async + "Notify mode-line that an async process run." :global t :lighter (:eval (propertize (format " [%s Async job(s) running]" (length (dired-async-processes))) @@ -321,8 +313,8 @@ ESC or `q' to not overwrite any of the remaining files, do (condition-case err (funcall fn from dest t) (file-error - (dired-log "%s: %s\n" (car err) (cdr err))) - nil)) + (dired-log "%s: %s\n" (car err) (cdr err)) + nil))) (when (get-buffer dired-log-buffer) (dired-log t) (with-current-buffer dired-log-buffer @@ -343,31 +335,18 @@ ESC or `q' to not overwrite any of the remaining files, (let (wdired-use-interactive-rename) (apply old-fn args))) -(defadvice wdired-do-renames (around wdired-async) - (let (wdired-use-interactive-rename) - ad-do-it)) - -(defadvice dired-create-files (around dired-async) - (dired-async-create-files file-creator operation fn-list - name-constructor marker-char)) - ;;;###autoload (define-minor-mode dired-async-mode "Do dired actions asynchronously." - :group 'dired-async :lighter dired-async-mode-lighter :global t (if dired-async-mode - (if (fboundp 'advice-add) - (progn (advice-add 'dired-create-files :override #'dired-async-create-files) - (advice-add 'wdired-do-renames :around #'dired-async-wdired-do-renames)) - (ad-activate 'dired-create-files) - (ad-activate 'wdired-do-renames)) - (if (fboundp 'advice-remove) - (progn (advice-remove 'dired-create-files #'dired-async-create-files) - (advice-remove 'wdired-do-renames #'dired-async-wdired-do-renames)) - (ad-deactivate 'dired-create-files) - (ad-deactivate 'wdired-do-renames)))) + (progn + (advice-add 'dired-create-files :override #'dired-async-create-files) + (advice-add 'wdired-do-renames :around #'dired-async-wdired-do-renames)) + (progn + (advice-remove 'dired-create-files #'dired-async-create-files) + (advice-remove 'wdired-do-renames #'dired-async-wdired-do-renames)))) (defmacro dired-async--with-async-create-files (&rest body) "Evaluate BODY with ‘dired-create-files’ set to ‘dired-async-create-files’." diff --git a/lisp/avy.el b/lisp/avy.el index c4ee91f6..d84e1259 100644 --- a/lisp/avy.el +++ b/lisp/avy.el @@ -4,8 +4,8 @@ ;; Author: Oleh Krehel ;; URL: https://github.com/abo-abo/avy -;; Package-Version: 20201226.1734 -;; Package-Commit: e92cb37457b43336b765630dbfbea8ba4be601fa +;; Package-Version: 20220102.805 +;; Package-Commit: ba5f035be33693d1a136a5cbeedb24327f551a92 ;; Version: 0.5.0 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5")) ;; Keywords: point, location @@ -496,8 +496,8 @@ KEYS is the path from the root of `avy-tree' to LEAF." "Store the current incomplete path during `avy-read'.") (defun avy-mouse-event-window (char) - "If CHAR is a mouse event, return the window of the event if any or the selected window. -Return nil if not a mouse event." + "Return the window of mouse event CHAR if any or the selected window. +Return nil if CHAR is not a mouse event." (when (mouse-event-p char) (cond ((windowp (posn-window (event-start char))) (posn-window (event-start char))) @@ -1607,7 +1607,8 @@ Which one depends on variable `subword-mode'." (defvar visual-line-mode) (defcustom avy-indent-line-overlay nil - "When non-nil, `avy-goto-line' will display the line overlay next to the first non-whitespace character of each line." + "When non-nil, display line overlay next to the first non-whitespace character. +This affects `avy-goto-line'." :type 'boolean) (defun avy--line-cands (&optional arg beg end bottom-up) diff --git a/lisp/awesome-tray.el b/lisp/awesome-tray.el index a9c0bae7..578c357c 100644 --- a/lisp/awesome-tray.el +++ b/lisp/awesome-tray.el @@ -217,11 +217,27 @@ :group 'awesome-tray) (defcustom awesome-tray-active-modules - '("location" "parent-dir" "mode-name" "battery" "date") + '("location" "buffer-name" "belong" "file-path" "mode-name" "input-method" "battery" "date") "Default active modules." :type 'list :group 'awesome-tray) +(defcustom awesome-tray-essential-modules + '("location" "buffer-name" "belong" "file-path") + "Default ellipsis modules, show when minibuffer is too long." + :type 'list + :group 'awesome-tray) + +(defcustom awesome-tray-buffer-name-max-length 20 + "Max length of buffer name." + :group 'awesome-tray + :type 'int) + +(defcustom awesome-tray-file-name-max-length 20 + "Max length of file name." + :group 'awesome-tray + :type 'int) + (defcustom awesome-tray-git-update-duration 5 "Update duration of git command, in seconds. @@ -230,6 +246,11 @@ Maybe you need set this option with bigger value to speedup on Windows platform. :type 'integer :group 'awesome-tray) +(defcustom awesome-tray-belong-update-duration 5 + "Update duration of which class, in seconds." + :type 'integer + :group 'awesome-tray) + (defcustom awesome-tray-battery-update-duration 5 "Update duration of battery status, in seconds. @@ -409,6 +430,14 @@ These goes before those shown in their full names." "Buffer read only face." :group 'awesome-tray) +(defface awesome-tray-module-belong-face + '((((background light)) + :foreground "#cc2444" :bold t) + (t + :foreground "#ff2d55" :bold t)) + "Buffer read only face." + :group 'awesome-tray) + (defface awesome-tray-module-input-method-face '((((background light)) :foreground "#008080" :bold t) @@ -438,6 +467,12 @@ These goes before those shown in their full names." (defvar awesome-tray-git-command-cache "") +(defvar awesome-tray-belong-last-time 0) + +(defvar awesome-tray-belong-last-buffer nil) + +(defvar awesome-tray-belong-cache "") + (defvar awesome-tray-battery-status-last-time 0) (defvar awesome-tray-battery-status-cache "") @@ -462,6 +497,7 @@ These goes before those shown in their full names." ("battery" . (awesome-tray-module-battery-info awesome-tray-module-battery-face)) ("input-method" . (awesome-tray-module-input-method-info awesome-tray-module-input-method-face)) ("buffer-read-only" . (awesome-tray-module-buffer-read-only-info awesome-tray-module-buffer-read-only-face)) + ("belong" . (awesome-tray-module-belong-info awesome-tray-module-belong-face)) )) (defun awesome-tray-enable () @@ -522,12 +558,18 @@ These goes before those shown in their full names." (erase-buffer)) (setq awesome-tray-active-p nil)) -(defun awesome-tray-build-info () +(defun awesome-tray-build-active-info () (condition-case nil (mapconcat 'identity (cl-remove-if #'(lambda (n) (equal (length n) 0)) (mapcar 'awesome-tray-get-module-info awesome-tray-active-modules)) " ") (format "Awesome Tray broken."))) +(defun awesome-tray-build-essential-info () + (condition-case nil + (mapconcat 'identity (cl-remove-if #'(lambda (n) (equal (length n) 0)) + (mapcar 'awesome-tray-get-module-info awesome-tray-essential-modules)) " ") + (format "Awesome Tray broken."))) + (defun awesome-tray-get-module-info (module-name) (let* ((func (ignore-errors (cadr (assoc module-name awesome-tray-module-alist)))) (face-param (ignore-errors (caddr (assoc module-name awesome-tray-module-alist)))) @@ -604,12 +646,17 @@ These goes before those shown in their full names." (format "%s" last-command)) (defun awesome-tray-module-buffer-name-info () - (if awesome-tray-buffer-name-buffer-changed - (if (and (buffer-modified-p) - (not (eq buffer-file-name nil))) - (concat (buffer-name) awesome-tray-buffer-name-buffer-changed-style) - (buffer-name)) - (format "%s" (buffer-name)))) + (let ((ellipsis "...") + bufname) + (setq bufname (if awesome-tray-buffer-name-buffer-changed + (if (and (buffer-modified-p) + (not (eq buffer-file-name nil))) + (concat (buffer-name) awesome-tray-buffer-name-buffer-changed-style) + (buffer-name)) + (format "%s" (buffer-name)))) + (if (> (length bufname) awesome-tray-buffer-name-max-length) + (format "%s%s" (substring bufname 0 (- awesome-tray-buffer-name-max-length (length ellipsis))) ellipsis) + bufname))) (defun awesome-tray-module-buffer-read-only-info () (if (and (eq buffer-read-only t) @@ -635,7 +682,17 @@ NAME is a string, typically a directory name." (defun awesome-tray-module-file-path-info () (if (not buffer-file-name) - (format "%s" (buffer-name)) + (let ((ellipsis "...") + (bufname (buffer-name))) + (setq bufname (if awesome-tray-buffer-name-buffer-changed + (if (and (buffer-modified-p) + (not (eq buffer-file-name nil))) + (concat (buffer-name) awesome-tray-buffer-name-buffer-changed-style) + (buffer-name)) + (format "%s" (buffer-name)))) + (if (> (length bufname) awesome-tray-file-name-max-length) + (format "%s%s" (substring bufname 0 (- awesome-tray-file-name-max-length (length ellipsis))) ellipsis) + bufname)) (let* ((file-path (split-string (buffer-file-name) "/" t)) (shown-path) (path-len (length file-path)) @@ -691,6 +748,54 @@ NAME is a string, typically a directory name." state) ""))) +(defun awesome-tray-module-belong-info () + (if (featurep 'tree-sitter) + (let ((current-seconds (awesome-tray-current-seconds))) + (if (or (not (eq (current-buffer) awesome-tray-belong-last-buffer)) + (> (- current-seconds awesome-tray-belong-last-time) awesome-tray-belong-update-duration)) + (progn + (setq awesome-tray-belong-last-time current-seconds) + (setq awesome-tray-belong-last-buffer (current-buffer)) + (awesome-tray-update-belong-cache)) + awesome-tray-belong-cache)) + "")) + +(defun awesome-tray-update-belong-cache () + (setq awesome-tray-belong-cache + (let* ((class-nodes (append (awesome-tray-get-match-nodes "(class_definition name: (symbol) @x)") + (awesome-tray-get-match-nodes "(class_definition name: (identifier) @x)"))) + (function-nodes (append (awesome-tray-get-match-nodes "(function_definition name: (symbol) @x)") + (awesome-tray-get-match-nodes "(function_definition name: (identifier) @x)"))) + which-belong-info + which-class-info + which-func-info) + (setq which-class-info (catch 'found + (dolist (class-node class-nodes) + (when (and (> (point) (tsc-node-start-position (tsc-get-parent class-node))) + (< (point) (tsc-node-end-position (tsc-get-parent class-node)))) + (throw 'found (tsc-node-text class-node))) + ) + (throw 'found ""))) + (setq which-func-info (catch 'found + (dolist (function-node function-nodes) + (when (and (> (point) (tsc-node-start-position (tsc-get-parent function-node))) + (< (point) (tsc-node-end-position (tsc-get-parent function-node)))) + (throw 'found (tsc-node-text function-node))) + ) + (throw 'found ""))) + (setq which-belong-info (string-trim (concat which-class-info " " which-func-info))) + (if (string-equal which-belong-info "") + "" + (format "[%s]" which-belong-info)))) + awesome-tray-belong-cache) + +(defun awesome-tray-get-match-nodes (match-rule) + (ignore-errors + (let* ((query (tsc-make-query tree-sitter-language match-rule)) + (root-node (tsc-root-node tree-sitter-tree)) + (captures (mapcar #'cdr (tsc-query-captures query root-node #'tsc--buffer-substring-no-properties)))) + captures))) + (defun awesome-tray-show-info () ;; Only flush tray info when current message is empty. (unless (current-message) @@ -698,33 +803,50 @@ NAME is a string, typically a directory name." (defun awesome-tray-get-frame-width () "Only calculating a main Frame width, to avoid wrong width when new frame, such as `snails'." - (with-selected-frame (car (last (frame-list))) + (if (display-graphic-p) + (with-selected-frame (car (last (frame-list))) + (frame-width)) (frame-width))) (defun awesome-tray-flush-info () - (let* ((tray-info (awesome-tray-build-info))) + (let* ((tray-info (awesome-tray-build-active-info))) (with-current-buffer " *Minibuf-0*" (erase-buffer) (insert (concat (make-string (max 0 (- (awesome-tray-get-frame-width) (string-width tray-info) awesome-tray-info-padding-right)) ?\ ) tray-info))))) (defun awesome-tray-get-echo-format-string (message-string) - (let* ((tray-info (awesome-tray-build-info)) - (blank-length (- (awesome-tray-get-frame-width) (string-width tray-info) (string-width message-string) awesome-tray-info-padding-right)) - (empty-fill-string (make-string (max 0 (- (awesome-tray-get-frame-width) (string-width tray-info) awesome-tray-info-padding-right)) ?\ )) - (message-fill-string (make-string (max 0 (- (awesome-tray-get-frame-width) (string-width message-string) (string-width tray-info) awesome-tray-info-padding-right)) ?\ ))) + (let* ((tray-info (awesome-tray-build-active-info)) + (blank-length (- (awesome-tray-get-frame-width) (string-width tray-info) (string-width message-string) awesome-tray-info-padding-right))) (prog1 (cond ;; Fill message's end with whitespace to keep tray info at right of minibuffer. ((> blank-length 0) - (concat message-string message-fill-string tray-info)) + (concat message-string + (make-string (max 0 (- (awesome-tray-get-frame-width) + (string-width message-string) + (string-width tray-info) + awesome-tray-info-padding-right)) ?\ ) + tray-info)) ;; Fill empty whitespace if new message contain duplicate tray-info (cause by move mouse on minibuffer window). ((and awesome-tray-last-tray-info message-string (string-suffix-p awesome-tray-last-tray-info message-string)) - (concat empty-fill-string tray-info)) - ;; Don't fill whitepsace at end of message if new message is very long. + (concat (make-string (max 0 (- (awesome-tray-get-frame-width) + (string-width tray-info) + awesome-tray-info-padding-right)) ?\ ) + tray-info)) (t - (concat message-string "\n" empty-fill-string tray-info))) + (let* ((essential-info (awesome-tray-build-essential-info)) + (fill-string (make-string (max 0 (- (awesome-tray-get-frame-width) + (string-width essential-info) + (string-width message-string) + awesome-tray-info-padding-right)) ?\ ))) + (if (> (+ (string-width message-string) (string-width fill-string) (string-width essential-info)) + (awesome-tray-get-frame-width)) + ;; Don't show tray information if message is too long. + message-string + (concat message-string fill-string essential-info)) + ))) ;; Record last tray information. (setq awesome-tray-last-tray-info tray-info)))) diff --git a/lisp/versions b/lisp/versions index e02cb95f..990aacbf 100644 --- a/lisp/versions +++ b/lisp/versions @@ -1,14 +1,14 @@ # -*- mode: org -*- | package | | current Version | Package-Version | previous Version | Package-Version | | |-----------------------------+---------+-----------------+-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------| -| ace-window.el | melpa | 0.10.0 | 20200606.1259 | 0.9.0 | - | | -| adaptive-wrap | elpa | 0.7 | - | | | required by virtual-auto-fill | -| all-the-icons | melpa | 4.0.0 | 20210106.1227 | 4.0.0 | 20200730.1545 | required by dashboard, requires memoize, run M-x all-the-icons-install-fonts | -| amx.el | melpa | 3.3 | 20210101.1921 | 3.3 | 20200701.2108 | requires ivy or ido, imporves M-x saving history, etc. | -| anaconda-mode.el | melpa | 0.1.13 | 20200912.239 | 0.1.13 | 20200129.1718 | | -| async | melpa | 1.9.4 | 20200809.501 | 1.9.4 | 20200113.1745 | required by ob-async | -| avy.el | melpa | 0.5.0 | 20201226.1734 | 0.5.0 | 20200624.1148 | | -| awesome-tray.el | [[https://github.com/manateelazycat/awesome-tray][GitHub]] | 4.2 | 20200618.2102 | | | modeline in echo area | +| ace-window.el | [[https://melpa.org/#/ace-window][melpa]] | 0.10.0 | 20200606.1259 | 0.9.0 | - | | +| adaptive-wrap | [[https://melpa.org/#/ace-window][elpa]] | 0.8 | - | 0.7 | - | required by virtual-auto-fill | +| all-the-icons | [[https://melpa.org/#/all-the-icons][melpa]] | 5.0.0 | 20211225.506 | 4.0.0 | 20210106.1227 | required by dashboard, requires memoize, run M-x all-the-icons-install-fonts | +| amx.el | [[https://melpa.org/#/amx][melpa]] | 3.4 | 20210305.118 | 3.3 | 20210101.1921 | requires ivy or ido, imporves M-x saving history, etc. | +| anaconda-mode | [[https://melpa.org/#/anaconda-mode][melpa]] | 0.1.15 | 20211122.817 | 0.1.13 | 20200912.239 | | +| async | [[https://melpa.org/#/async][melpa]] | 1.9.5 | 20210823.528 | 1.9.4 | 20200809.501 | required by ob-async | +| avy.el | [[https://melpa.org/#/avy][melpa]] | 0.5.0 | 20220102.805 | 0.5.0 | 20201226.1734 | | +| awesome-tray.el | [[https://github.com/manateelazycat/awesome-tray][GitHub]] | 4.2 | 20211129.311 | 4.2 | 20200618.2102 | modeline in echo area | | biblio | melpa | 0.2 | 20200416.1407 | 0.2 | 20190624.1408 | | | biblio-core.el | melpa | 0.2.1 | 20200416.307 | 0.2 | 20190624.1408 | | | bibtex-completion.el | melpa | 1.0.0 | 20200908.1017 | 1.0.0 | 20200513.852 | required by ivy-bibtex | diff --git a/settings/pre-settings.el b/settings/pre-settings.el index 0ccf8177..07a79cb1 100644 --- a/settings/pre-settings.el +++ b/settings/pre-settings.el @@ -5,6 +5,7 @@ (list (concat config-dir "settings") ;; path where settings files are kept (concat config-dir "lisp") ;; personal elisp lib dir, for manually installed packages + (concat config-dir "lisp/adaptive-wrap") ;; https://elpa.gnu.org/packages/adaptive-wrap.html (concat config-dir "lisp/dash") (concat config-dir "lisp/with-editor") (concat config-dir "lisp/hydra") ;; required by treemacs org-ref diff --git a/settings/python-settings.el b/settings/python-settings.el index fdffc44e..ce925aed 100644 --- a/settings/python-settings.el +++ b/settings/python-settings.el @@ -97,6 +97,7 @@ process." ) (use-package anaconda-mode ;; works with company-mode via company-anaconda + :load-path (lambda() (concat config-dir "lisp/anaconda-mode")) :after python :delight (anaconda-mode "Ⓐ") ;; Ⓐ a :bind (([remap anaconda-mode-show-doc] . my-anaconda-mode-show-doc)) ;; M-?