PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES

This commit is contained in:
Henrik Lissner 2017-04-17 02:17:10 -04:00
parent ef88d30b73
commit 5ae94b765c
79 changed files with 798 additions and 795 deletions

View file

@ -5,7 +5,7 @@
(let* ((modes (if (listp modes) modes (list modes)))
(backends (if (listp backends) backends (list backends)))
(def-name (intern (format "doom--init-company-%s"
(mapconcat 'identity (mapcar 'symbol-name modes) "-"))))
(mapconcat #'identity (mapcar #'symbol-name modes) "-"))))
(quoted (eq (car-safe backends) 'quote)))
;; TODO more type checks
`(progn
@ -35,7 +35,7 @@
company-frontends '(company-pseudo-tooltip-frontend company-echo-metadata-frontend)
company-backends '(company-capf))
(push 'company-sort-by-occurrence company-transformers)
(push #'company-sort-by-occurrence company-transformers)
(after! yasnippet
(nconc company-backends '(company-yasnippet)))
@ -44,25 +44,25 @@
;; Don't interfere with `evil-delete-backward-word' in insert mode
"C-w" nil
"C-o" 'company-search-kill-others
"C-n" 'company-select-next
"C-p" 'company-select-previous
"C-h" 'company-quickhelp-manual-begin
"C-S-h" 'company-show-doc-buffer
"C-S-s" 'company-search-candidates
"C-s" 'company-filter-candidates
"C-SPC" 'company-complete-common
"C-h" 'company-quickhelp-manual-begin
[tab] 'company-complete-common-or-cycle
[backtab] 'company-select-previous
"C-o" #'company-search-kill-others
"C-n" #'company-select-next
"C-p" #'company-select-previous
"C-h" #'company-quickhelp-manual-begin
"C-S-h" #'company-show-doc-buffer
"C-S-s" #'company-search-candidates
"C-s" #'company-filter-candidates
"C-SPC" #'company-complete-common
"C-h" #'company-quickhelp-manual-begin
[tab] #'company-complete-common-or-cycle
[backtab] #'company-select-previous
[escape] (λ! (company-abort) (evil-normal-state 1)))
;; Automatically applies to `company-filter-map'
(:map company-search-map
"C-n" 'company-search-repeat-forward
"C-p" 'company-search-repeat-backward
"C-n" #'company-search-repeat-forward
"C-p" #'company-search-repeat-backward
"C-s" (λ! (company-search-abort) (company-filter-candidates))
[escape] 'company-search-abort))
[escape] #'company-search-abort))
(global-company-mode +1))
@ -90,7 +90,7 @@
(if (symbol-value mode)
(push mode company-dict-minor-mode-list)
(setq company-dict-minor-mode-list (delq mode company-dict-minor-mode-list))))
(add-hook 'doom-project-hook '+company|enable-project-dicts))
(add-hook 'doom-project-hook #'+company|enable-project-dicts))
;;

View file

@ -35,29 +35,29 @@
:config
(setq projectile-completion-system 'helm)
(map! "M-x" 'helm-M-x
"A-x" 'helm-M-x
"M-X" 'helm-apropos
"A-X" 'helm-apropos
"M-o" 'helm-find-files
(map! "M-x" #'helm-M-x
"A-x" #'helm-M-x
"M-X" #'helm-apropos
"A-X" #'helm-apropos
"M-o" #'helm-find-files
(:map helm-map
"C-S-n" 'helm-next-source
"C-S-p" 'helm-previous-source
"C-u" 'helm-delete-minibuffer-contents
"C-w" 'backward-kill-word
"M-v" 'clipboard-yank
"C-r" 'evil-paste-from-register ; Evil registers in helm! Glorious!
"C-b" 'backward-word
"<left>" 'backward-char
"<right>" 'forward-char
"<escape>" 'helm-keyboard-quit
"ESC" 'helm-keyboard-quit
[escape] 'helm-keyboard-quit
"<tab>" 'helm-execute-persistent-action)
"C-S-n" #'helm-next-source
"C-S-p" #'helm-previous-source
"C-u" #'helm-delete-minibuffer-contents
"C-w" #'backward-kill-word
"M-v" #'clipboard-yank
"C-r" #'evil-paste-from-register ; Evil registers in helm! Glorious!
"C-b" #'backward-word
"<left>" #'backward-char
"<right>" #'forward-char
"<escape>" #'helm-keyboard-quit
"ESC" #'helm-keyboard-quit
[escape] #'helm-keyboard-quit
"<tab>" #'helm-execute-persistent-action)
(:map* helm-generic-files-map
:e "ESC" 'helm-keyboard-quit))
:e "ESC" #'helm-keyboard-quit))
;;; Popup setup
(set! :popup "\\` ?\\*[hH]elm.*?\\*\\'" :size 14 :regexp t)
@ -65,29 +65,29 @@
;;; Helm hacks
(defconst doom-helm-header-fg (face-attribute 'helm-source-header :foreground))
;; Shrink source headers if there is only one source
(add-hook 'helm-after-initialize-hook 'doom*helm-hide-source-header-maybe)
(add-hook 'helm-after-initialize-hook #'doom*helm-hide-source-header-maybe)
;; A simpler prompt: see `+helm-global-prompt'
(advice-add 'helm :filter-args 'doom*helm-replace-prompt)
(advice-add #'helm :filter-args #'doom*helm-replace-prompt)
;; Hide mode-line in helm windows
(advice-add 'helm-display-mode-line :override 'doom*helm-hide-header)
(advice-add #'helm-display-mode-line :override #'doom*helm-hide-header)
(require 'helm-mode)
(helm-mode +1)
(map! :map helm-mode-map
[remap find-file] 'helm-find-files
[remap switch-to-buffer] 'doom/helm-buffers-dwim
[remap find-file] #'helm-find-files
[remap switch-to-buffer] #'doom/helm-buffers-dwim
[remap projectile-switch-to-buffer] (λ! (doom/helm-buffers-dwim t))
[remap recentf] 'helm-recentf
[remap projectile-recentf] 'helm-projectile-recentf
[remap projectile-find-file] 'helm-projectile-find-file
[remap imenu] 'helm-semantic-or-imenu
[remap bookmark-jump] 'helm-bookmarks
[remap noop-show-kill-ring] 'helm-show-kill-ring
[remap projectile-switch-project] 'helm-projectile-switch-project
[remap projectile-find-file] 'helm-projectile-find-file
[remap imenu-anywhere] 'helm-imenu-anywhere
[remap execute-extended-command] 'helm-M-x)
[remap recentf] #'helm-recentf
[remap projectile-recentf] #'helm-projectile-recentf
[remap projectile-find-file] #'helm-projectile-find-file
[remap imenu] #'helm-semantic-or-imenu
[remap bookmark-jump] #'helm-bookmarks
[remap noop-show-kill-ring] #'helm-show-kill-ring
[remap projectile-switch-project] #'helm-projectile-switch-project
[remap projectile-find-file] #'helm-projectile-find-file
[remap imenu-anywhere] #'helm-imenu-anywhere
[remap execute-extended-command] #'helm-M-x)
(defvar helm-projectile-find-file-map (make-sparse-keymap))
(require 'helm-projectile)
@ -103,7 +103,7 @@
(def-package! helm-buffers
:commands (helm-buffers-list helm-mini)
:config (advice-add 'helm-buffer-list :override 'helm*buffer-list))
:config (advice-add #'helm-buffer-list :override #'helm*buffer-list))
(def-package! helm-tags
@ -123,8 +123,8 @@
helm-boring-file-regexp-list))
(map! :map helm-find-files-map
"C-w" 'helm-find-files-up-one-level
"TAB" 'helm-execute-persistent-action))
"C-w" #'helm-find-files-up-one-level
"TAB" #'helm-execute-persistent-action))
(def-package! helm-ag
@ -140,11 +140,11 @@
helm-ag-clear-stack)
:config
(map! (:map helm-ag-map
"<backtab>" 'helm-ag-edit)
"<backtab>" #'helm-ag-edit)
(:map helm-ag-edit-map
"<escape>" 'helm-ag--edit-abort
"C-c C-c" 'helm-ag--edit-commit
:n "zx" 'helm-ag--edit-abort)))
"<escape>" #'helm-ag--edit-abort
"C-c C-c" #'helm-ag--edit-commit
:n "zx" #'helm-ag--edit-abort)))
(def-package! helm-css-scss ; https://github.com/ShingoFukuyama/helm-css-scss
@ -152,7 +152,7 @@
helm-css-scss-multi
helm-css-scss-insert-close-comment)
:config
(setq helm-css-scss-split-direction 'split-window-vertically
(setq helm-css-scss-split-direction #'split-window-vertically
helm-css-scss-split-with-multiple-windows t))
@ -187,19 +187,20 @@
(after! helm-swoop
(setq helm-swoop-split-window-function (lambda (b) (doom-popup-buffer b))))
(after! helm-ag
;; This prevents helm-ag from switching between windows and buffers.
(defadvice helm-ag--edit-abort (around helm-ag-edit-abort-popup-compat activate)
(cl-letf (((symbol-function 'select-window) 'ignore)) ad-do-it)
(cl-letf (((symbol-function 'select-window) #'ignore)) ad-do-it)
(doom/popup-close nil t))
(defadvice helm-ag--edit-commit (around helm-ag-edit-commit-popup-compat activate)
(cl-letf (((symbol-function 'select-window) 'ignore)) ad-do-it)
(cl-letf (((symbol-function 'select-window) #'ignore)) ad-do-it)
(doom/popup-close nil t))
(defadvice helm-ag--edit (around helm-ag-edit-popup-compat activate)
(cl-letf (((symbol-function 'other-window) 'ignore)
((symbol-function 'switch-to-buffer) 'doom-popup-buffer))
(cl-letf (((symbol-function 'other-window) #'ignore)
((symbol-function 'switch-to-buffer) #'doom-popup-buffer))
ad-do-it
(with-current-buffer (get-buffer "*helm-ag-edit*")
(use-local-map helm-ag-edit-map)))))

View file

@ -30,9 +30,9 @@
(require 'crm-custom)
(map! :map (ido-common-completion-map ido-completion-map ido-file-completion-map)
"C-n" 'ido-next-match
"C-p" 'ido-prev-match
"C-w" 'ido-delete-backward-word-updir))
"C-n" #'ido-next-match
"C-p" #'ido-prev-match
"C-w" #'ido-delete-backward-word-updir))
(defun +ido*sort-mtime ()
"Sort ido filelist by mtime instead of alphabetically."
@ -46,16 +46,16 @@
(delq nil (mapcar
(lambda (x) (and (char-equal (string-to-char x) ?.) x))
ido-temp-list))))
(advice-add 'ido-sort-mtime :override '+ido*sort-mtime)
(add-hook! (ido-make-file-list ido-make-dir-list) '+ido*sort-mtime)
(advice-add #'ido-sort-mtime :override #'+ido*sort-mtime)
(add-hook! (ido-make-file-list ido-make-dir-list) #'+ido*sort-mtime)
(defun +ido|setup-home-keybind ()
"Go to $HOME with ~"
(define-key ido-file-completion-map (kbd "~")
(λ! (if (looking-back "/")
(insert "~/")
(call-interactively 'self-insert-command)))))
(add-hook 'ido-setup-hook '+ido|setup-home-keybind))
(call-interactively #'self-insert-command)))))
(add-hook 'ido-setup-hook #'+ido|setup-home-keybind))
(def-package! ido-ubiquitous :config (ido-ubiquitous-mode 1))

View file

@ -33,33 +33,34 @@
;; Don't use ^ as initial input
ivy-initial-inputs-alist nil
;; highlight til EOL
ivy-format-function 'ivy-format-function-line)
ivy-format-function #'ivy-format-function-line)
(after! magit (setq magit-completing-read-function 'ivy-completing-read))
(after! yasnippet (push '+ivy-yas-prompt yas-prompt-functions))
(after! magit (setq magit-completing-read-function #'ivy-completing-read))
(after! yasnippet (push #'+ivy-yas-prompt yas-prompt-functions))
(ivy-mode +1)
(map! :map ivy-minibuffer-map
[escape] 'keyboard-escape-quit
"C-r" 'evil-paste-from-register
"M-v" 'clipboard-yank
"C-w" 'backward-kill-word
"C-u" 'backward-kill-sentence
"C-b" 'backward-word
"C-f" 'forward-word)
[escape] #'keyboard-escape-quit
"C-r" #'evil-paste-from-register
"M-v" #'clipboard-yank
"C-w" #'backward-kill-word
"C-u" #'backward-kill-sentence
"C-b" #'backward-word
"C-f" #'forward-word)
(map! :map ivy-mode-map
[remap find-file] 'counsel-find-file
[remap switch-to-buffer] '+ivy/switch-buffer
[remap persp-switch-to-buffer] '+ivy/switch-workspace-buffer
[remap recentf] 'counsel-recentf
[remap imenu] 'counsel-imenu
[remap bookmark-jump] 'counsel-bookmark
[remap projectile-switch-project] 'counsel-projectile-switch-project
[remap projectile-find-file] 'counsel-projectile-find-file
[remap imenu-anywhere] 'ivy-imenu-anywhere
[remap execute-extended-command] 'counsel-M-x)
[remap describe-face] #'counsel-describe-face
[remap find-file] #'counsel-find-file
[remap switch-to-buffer] #'+ivy/switch-buffer
[remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer
[remap recentf] #'counsel-recentf
[remap imenu] #'counsel-imenu
[remap bookmark-jump] #'counsel-bookmark
[remap projectile-switch-project] #'counsel-projectile-switch-project
[remap projectile-find-file] #'counsel-projectile-find-file
[remap imenu-anywhere] #'ivy-imenu-anywhere
[remap execute-extended-command] #'counsel-M-x)
(when (featurep! :feature workspaces)
(nconc ivy-sort-functions-alist
@ -110,11 +111,11 @@
(when (eq major-mode 'ivy-occur-grep-mode)
(ivy-wgrep-change-to-wgrep-mode)))
(advice-add 'counsel-ag-function :override '+ivy*counsel-ag-function)
(advice-add #'counsel-ag-function :override #'+ivy*counsel-ag-function)
(map! :map counsel-ag-map
[backtab] '+ivy/counsel-ag-occur ; search/replace on results
"C-SPC" 'counsel-git-grep-recenter ; preview
"M-RET" '+ivy/counsel-ag-open-in-other-window))
[backtab] #'+ivy/counsel-ag-occur ; search/replace on results
"C-SPC" #'counsel-git-grep-recenter ; preview
"M-RET" #'+ivy/counsel-ag-open-in-other-window))
;; Used by `counsel-M-x'