Minor updates.

This commit is contained in:
Derek Taylor
2020-08-11 17:27:59 -05:00
parent c00618a23a
commit 367af05623
154 changed files with 2484 additions and 1801 deletions

View File

@@ -34,7 +34,6 @@ https://assets.doomemacs.org/completion/company/overlay.png
** Plugins
+ [[https://github.com/company-mode/company-mode][company-mode]]
+ [[https://github.com/hlissner/emacs-company-dict][company-dict]]
+ [[https://github.com/raxod502/prescient.el][company-prescient]]
+ [[https://github.com/sebastiencs/company-box][company-box]]* (=+childframe=)
* Prerequisites

View File

@@ -9,17 +9,18 @@
company-tooltip-limit 14
company-tooltip-align-annotations t
company-require-match 'never
company-global-modes
'(not erc-mode message-mode help-mode gud-mode)
company-global-modes '(not erc-mode message-mode help-mode gud-mode)
company-frontends '(company-pseudo-tooltip-frontend
company-echo-metadata-frontend)
;; Buffer-local backends will be computed when loading a major mode, so
;; only specify a global default here.
company-backends '(company-capf)
company-backends '(company-capf)
;; Company overrides `company-active-map' based on
;; `company-auto-complete-chars'; no magic please!
;; These auto-complete the current selection when
;; `company-auto-complete-chars' is typed. This is too magical. We
;; already have the much more explicit RET and TAB.
company-auto-complete nil
company-auto-complete-chars nil
;; Only search the current buffer for `company-dabbrev' (a backend that
@@ -75,14 +76,6 @@
(add-to-list 'company-files--regexps "file:\\(\\(?:\\.\\{1,2\\}/\\|~/\\|/\\)[^\]\n]*\\)"))
(use-package! company-prescient
:hook (company-mode . company-prescient-mode)
:config
;; NOTE prescient config duplicated with `ivy'
(setq prescient-save-file (concat doom-cache-dir "prescient-save.el"))
(prescient-persist-mode +1))
(use-package! company-box
:when (featurep! +childframe)
:hook (company-mode . company-box-mode)

View File

@@ -1,8 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el
(package! company :pin "6333fc4ebbbf4d28e834de8715561e984f149ecb")
(package! company :pin "5eb7d868c2a13bbfb14060b79d69f0d59f6a5f60")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(package! company-prescient :pin "0f4a89bdec61395138d968a38d375e63ccfbed63")
(when (featurep! +childframe)
(package! company-box :pin "3814fcb14e92f4b85b19e664e216a7c8d5c7144d"))
(package! company-box :pin "889d723786df2de27d248c9965149d04af44273a"))

View File

@@ -1,19 +1,19 @@
;; -*- no-byte-compile: t; -*-
;;; completion/helm/packages.el
(package! helm :pin "b6db9fb47a8900704394e63b795f4a54cb4701a8")
(package! helm-rg :pin "785a80fe5cc87e27c5ea3d00a70049028d9e2847")
(package! helm-c-yasnippet :pin "65ca732b510bfc31636708aebcfe4d2d845b59b0")
(package! helm :pin "5d224cb889aea8f090c82c5ae572b8db276bcf80")
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
(package! helm-c-yasnippet :pin "89cc8561e7e57e9d1070ee3641df019c7f49c5dd")
(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde")
(package! helm-describe-modes
:recipe (:host github :repo "emacs-helm/helm-describe-modes")
:pin "11fb36af119b784539d31c6160002de1957408aa")
(package! helm-projectile :pin "5328b74dddcee8d1913803ca8167868831a07463")
(package! helm-projectile :pin "2f3a2a03d6cb9419c25b432637aa11c8d2f9f3b7")
(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008")
(when (featurep! +fuzzy)
(package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e"))
(when (featurep! +childframe)
(package! posframe :pin "093b29a53cbeda6d637ccc9ef4dfc47123e79b9e"))
(package! posframe :pin "922e4d239f7a083213d856de67a9686a091b1e27"))
(when (featurep! :lang org)
(package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24"))
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")

View File

@@ -2,7 +2,7 @@
;;; completion/ido/packages.el
(package! flx-ido :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")
(package! ido-completing-read+ :pin "98d3a6e56b1d3652da7b47f49f76d77f82ea80ba")
(package! ido-completing-read+ :pin "b9ca2566b867464c25b720e2148d240961c110e7")
(package! ido-sort-mtime :pin "f638ff0c922af862f5211779f2311a27fde428eb")
(package! ido-vertical-mode :pin "16c4c1a112796ee0bcf401ea39d3e2643a89feaf")
(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d")

View File

@@ -77,6 +77,26 @@ Buffers that are considered unreal (see `doom-real-buffer-p') are dimmed with
((format "%s" val)))
t)))
;;;###autoload
(defun +ivy-format-function-line-or-arrow (cands)
"Transform CANDS into a string for minibuffer.
If in terminal, prefix candidates with a chevron to make it more obvious which
one you're selecting, especially in themes that can't set a good background for
`ivy-current-match'. This is a combination of `ivy-format-function-line' and
`ivy-format-function-arrow'.
In the GUI, this is the same as `ivy-format-function-line'."
(if (display-graphic-p)
(ivy-format-function-line cands)
(ivy--format-function-generic
(lambda (str)
(ivy--add-face (concat "> " str "\n") 'ivy-current-match))
(lambda (str)
(concat " " str "\n"))
cands
"")))
;;
;; Library

View File

@@ -69,7 +69,7 @@ results buffer.")
;; Highlight each ivy candidate including the following newline, so that it
;; extends to the right edge of the window
(setf (alist-get 't ivy-format-functions-alist)
#'ivy-format-function-line)
#'+ivy-format-function-line-or-arrow)
;; Integrate `ivy' with `better-jumper'; ensure a jump point is registered
;; before jumping to new locations with ivy
@@ -278,11 +278,11 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
"Change `counsel-file-jump' to use fd or ripgrep, if they are available."
:override #'counsel--find-return-list
(cl-destructuring-bind (find-program . args)
(cond ((executable-find doom-projectile-fd-binary)
(append (list doom-projectile-fd-binary
"--color=never" "-E" ".git"
"--type" "file" "--type" "symlink" "--follow")
(if IS-WINDOWS '("--path-separator=/"))))
(cond ((when-let (fd (executable-find (or doom-projectile-fd-binary "fd")))
(append (list fd
"--color=never" "-E" ".git"
"--type" "file" "--type" "symlink" "--follow")
(if IS-WINDOWS '("--path-separator=/")))))
((executable-find "rg")
(append (list "rg" "--files" "--follow" "--color=never" "--hidden" "--no-messages")
(cl-loop for dir in projectile-globally-ignored-directories
@@ -296,10 +296,9 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(cons find-program args)
(lambda ()
(goto-char (point-min))
(let ((offset (if (member find-program (list "rg" doom-projectile-fd-binary)) 0 2))
files)
(let (files)
(while (< (point) (point-max))
(push (buffer-substring (+ offset (line-beginning-position)) (line-end-position))
(push (buffer-substring (line-beginning-position) (line-end-position))
files)
(forward-line 1))
(nreverse files)))))))

View File

@@ -1,18 +1,18 @@
;; -*- no-byte-compile: t; -*-
;;; completion/ivy/packages.el
(package! swiper :pin "544e7de63a4543a74596c5d95efa0bb9da25791e")
(package! swiper :pin "c6b60d34ac37bf4d91a25f16d22e528f85e06938")
(package! ivy)
(package! ivy-hydra)
(package! counsel)
(package! amx :pin "7fb7b874291e0cdeb1f0acb18564a686ec86788d")
(package! amx :pin "ccfc92c600df681df5e8b5fecec328c462ceb71e")
(package! counsel-projectile :pin "77392cbbc42e98fc137b43f1db1b111ba6e2dd75")
(package! ivy-rich :pin "10970130b41c6ef9570893cdab8dfbe720e2b1a9")
(package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f")
(if (featurep! +prescient)
(package! ivy-prescient :pin "3ab7605d997fb8337bf5ded2ad960b98ac0e1fd7")
(package! ivy-prescient :pin "b11d79b10df12c58edc3487371c2c47dfb9b50e6")
(when (featurep! +fuzzy)
(package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")))