Revert macros to ...! name convention (elisp doesn't like @...)
This commit is contained in:
parent
b64d5554e3
commit
33c88d4f82
125 changed files with 877 additions and 880 deletions
|
@ -1,6 +1,6 @@
|
|||
;;; completion/company/config.el
|
||||
|
||||
(@def-setting :company-backend (modes backends)
|
||||
(def-setting! :company-backend (modes backends)
|
||||
"Register company BACKENDS to MODES."
|
||||
(let* ((modes (if (listp modes) modes (list modes)))
|
||||
(backends (if (listp backends) backends (list backends)))
|
||||
|
@ -13,14 +13,14 @@
|
|||
(require 'company)
|
||||
(set (make-local-variable 'company-backends)
|
||||
(append '((,@backends)) company-backends)))
|
||||
(@add-hook ,modes ',def-name))))
|
||||
(add-hook! ,modes ',def-name))))
|
||||
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
;;
|
||||
|
||||
(@def-package company
|
||||
(def-package! company
|
||||
:commands (company-mode global-company-mode company-complete
|
||||
company-complete-common company-manual-begin company-grab-line)
|
||||
:config
|
||||
|
@ -36,14 +36,14 @@
|
|||
company-frontends '(company-pseudo-tooltip-frontend company-echo-metadata-frontend)
|
||||
company-backends '(company-capf))
|
||||
|
||||
(@set :company-backend 'python-mode '(company-anaconda))
|
||||
(set! :company-backend 'python-mode '(company-anaconda))
|
||||
|
||||
(push 'company-sort-by-occurrence company-transformers)
|
||||
|
||||
(@after yasnippet
|
||||
(after! yasnippet
|
||||
(nconc company-backends '(company-yasnippet)))
|
||||
|
||||
(@map (:map company-active-map
|
||||
(map! (:map company-active-map
|
||||
;; Don't interfere with insert mode binding for `evil-delete-backward-word'
|
||||
"C-w" nil
|
||||
|
||||
|
@ -57,20 +57,20 @@
|
|||
"C-SPC" 'company-complete-common
|
||||
[tab] 'company-complete-common-or-cycle
|
||||
[backtab] 'company-select-previous
|
||||
[escape] (@λ (company-abort) (evil-normal-state 1))
|
||||
[escape] (λ! (company-abort) (evil-normal-state 1))
|
||||
[C-return] 'counsel-company)
|
||||
|
||||
;; Automatically applies to `company-filter-map'
|
||||
(:map company-search-map
|
||||
"C-n" 'company-search-repeat-forward
|
||||
"C-p" 'company-search-repeat-backward
|
||||
"C-s" (@λ (company-search-abort) (company-filter-candidates))
|
||||
"C-s" (λ! (company-search-abort) (company-filter-candidates))
|
||||
[escape] 'company-search-abort))
|
||||
|
||||
(global-company-mode +1))
|
||||
|
||||
|
||||
(@def-package company-statistics
|
||||
(def-package! company-statistics
|
||||
:after company
|
||||
:config
|
||||
(setq company-statistics-file (concat doom-cache-dir "company-stats-cache.el"))
|
||||
|
@ -78,14 +78,14 @@
|
|||
|
||||
|
||||
;; Looks ugly on OSX without emacs-mac build
|
||||
(@def-package company-quickhelp
|
||||
(def-package! company-quickhelp
|
||||
:after company
|
||||
:config
|
||||
(setq company-quickhelp-delay nil)
|
||||
(company-quickhelp-mode +1))
|
||||
|
||||
|
||||
(@def-package company-dict
|
||||
(def-package! company-dict
|
||||
:commands company-dict)
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/company/packages.el
|
||||
|
||||
(@package company)
|
||||
(@package company-dict)
|
||||
(@package company-quickhelp)
|
||||
(@package company-statistics)
|
||||
(package! company)
|
||||
(package! company-dict)
|
||||
(package! company-quickhelp)
|
||||
(package! company-statistics)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
;; Packages
|
||||
;;
|
||||
|
||||
(@def-package helm :demand t
|
||||
(def-package! helm :demand t
|
||||
:init
|
||||
(setq helm-quick-update t
|
||||
;; Speedier without fuzzy matching
|
||||
|
@ -35,7 +35,7 @@
|
|||
:config
|
||||
(setq projectile-completion-system 'helm)
|
||||
|
||||
(@map "M-x" 'helm-M-x
|
||||
(map! "M-x" 'helm-M-x
|
||||
"A-x" 'helm-M-x
|
||||
"M-X" 'helm-apropos
|
||||
"A-X" 'helm-apropos
|
||||
|
@ -60,7 +60,7 @@
|
|||
:e "ESC" 'helm-keyboard-quit))
|
||||
|
||||
;;; Popup setup
|
||||
(@set :popup "\\` ?\\*[hH]elm.*?\\*\\'" :size 14 :regexp t)
|
||||
(set! :popup "\\` ?\\*[hH]elm.*?\\*\\'" :size 14 :regexp t)
|
||||
|
||||
;;; Helm hacks
|
||||
(defconst doom-helm-header-fg (face-attribute 'helm-source-header :foreground))
|
||||
|
@ -74,7 +74,7 @@
|
|||
(require 'helm-mode)
|
||||
(helm-mode +1)
|
||||
|
||||
(@map :map helm-mode-map
|
||||
(map! :map helm-mode-map
|
||||
[remap find-file] 'helm-find-files
|
||||
[remap switch-to-buffer] 'doom/helm-buffers-dwim
|
||||
[remap projectile-switch-to-buffer] (λ! (doom/helm-buffers-dwim t))
|
||||
|
@ -94,40 +94,40 @@
|
|||
(set-keymap-parent helm-projectile-find-file-map helm-map))
|
||||
|
||||
|
||||
(@def-package helm-locate
|
||||
(def-package! helm-locate
|
||||
:init
|
||||
(defvar helm-generic-files-map (make-sparse-keymap)
|
||||
"Generic Keymap for files.")
|
||||
:config (set-keymap-parent helm-generic-files-map helm-map))
|
||||
|
||||
|
||||
(@def-package helm-buffers
|
||||
(def-package! helm-buffers
|
||||
:commands (helm-buffers-list helm-mini)
|
||||
:config (advice-add 'helm-buffer-list :override 'helm*buffer-list))
|
||||
|
||||
|
||||
(@def-package helm-tags
|
||||
(def-package! helm-tags
|
||||
:commands (helm-tags-get-tag-file helm-etags-select))
|
||||
|
||||
|
||||
(@def-package helm-bookmark
|
||||
(def-package! helm-bookmark
|
||||
:commands (helm-bookmarks helm-filtered-bookmarks)
|
||||
:config (setq-default helm-bookmark-show-location t))
|
||||
|
||||
|
||||
(@def-package helm-files
|
||||
(def-package! helm-files
|
||||
:commands (helm-browse-project helm-find helm-find-files helm-for-files helm-multi-files helm-recentf)
|
||||
:config
|
||||
(setq helm-boring-file-regexp-list
|
||||
(append (list "\\.projects$" "\\.DS_Store$")
|
||||
helm-boring-file-regexp-list))
|
||||
|
||||
(@map :map helm-find-files-map
|
||||
(map! :map helm-find-files-map
|
||||
"C-w" 'helm-find-files-up-one-level
|
||||
"TAB" 'helm-execute-persistent-action))
|
||||
|
||||
|
||||
(@def-package helm-ag
|
||||
(def-package! helm-ag
|
||||
:commands (helm-ag
|
||||
helm-ag-mode
|
||||
helm-do-ag
|
||||
|
@ -139,7 +139,7 @@
|
|||
helm-ag-buffers
|
||||
helm-ag-clear-stack)
|
||||
:config
|
||||
(@map (:map helm-ag-map
|
||||
(map! (:map helm-ag-map
|
||||
"<backtab>" 'helm-ag-edit)
|
||||
(:map helm-ag-edit-map
|
||||
"<escape>" 'helm-ag--edit-abort
|
||||
|
@ -147,7 +147,7 @@
|
|||
:n "zx" 'helm-ag--edit-abort)))
|
||||
|
||||
|
||||
(@def-package helm-css-scss ; https://github.com/ShingoFukuyama/helm-css-scss
|
||||
(def-package! helm-css-scss ; https://github.com/ShingoFukuyama/helm-css-scss
|
||||
:commands (helm-css-scss
|
||||
helm-css-scss-multi
|
||||
helm-css-scss-insert-close-comment)
|
||||
|
@ -156,7 +156,7 @@
|
|||
helm-css-scss-split-with-multiple-windows t))
|
||||
|
||||
|
||||
(@def-package helm-swoop ; https://github.com/ShingoFukuyama/helm-swoop
|
||||
(def-package! helm-swoop ; https://github.com/ShingoFukuyama/helm-swoop
|
||||
:commands (helm-swoop helm-multi-swoop helm-multi-swoop-all)
|
||||
:config
|
||||
(setq helm-swoop-use-line-number-face t
|
||||
|
@ -165,18 +165,18 @@
|
|||
helm-swoop-pre-input-function (lambda () "")))
|
||||
|
||||
|
||||
(@def-package helm-describe-modes :commands helm-describe-modes)
|
||||
(@def-package helm-ring :commands helm-show-kill-ring)
|
||||
(@def-package helm-semantic :commands helm-semantic-or-imenu)
|
||||
(@def-package helm-elisp :commands helm-apropos)
|
||||
(@def-package helm-command :commands helm-M-x)
|
||||
(def-package! helm-describe-modes :commands helm-describe-modes)
|
||||
(def-package! helm-ring :commands helm-show-kill-ring)
|
||||
(def-package! helm-semantic :commands helm-semantic-or-imenu)
|
||||
(def-package! helm-elisp :commands helm-apropos)
|
||||
(def-package! helm-command :commands helm-M-x)
|
||||
|
||||
|
||||
;;
|
||||
;; Popup hacks
|
||||
;;
|
||||
|
||||
(@after helm
|
||||
(after! helm
|
||||
;; Helm tries to clean up after itself, but shackle has already done this.
|
||||
;; This fixes that. To reproduce, add a helm rule in `shackle-rules', open two
|
||||
;; splits side-by-side, move to the buffer on the right and invoke helm. It
|
||||
|
@ -184,10 +184,10 @@
|
|||
(setq-default helm-reuse-last-window-split-state t
|
||||
helm-split-window-in-side-p t))
|
||||
|
||||
(@after helm-swoop
|
||||
(after! helm-swoop
|
||||
(setq helm-swoop-split-window-function (lambda (b) (doom-popup-buffer b))))
|
||||
|
||||
(@after helm-ag
|
||||
(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)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/helm/packages.el
|
||||
|
||||
(@package helm)
|
||||
(@package helm-ag)
|
||||
(@package helm-c-yasnippet)
|
||||
(@package helm-company)
|
||||
(@package helm-css-scss)
|
||||
(@package helm-describe-modes :recipe (:fetcher github :repo "emacs-helm/helm-describe-modes"))
|
||||
(@package helm-projectile)
|
||||
(@package helm-swoop)
|
||||
(package! helm)
|
||||
(package! helm-ag)
|
||||
(package! helm-c-yasnippet)
|
||||
(package! helm-company)
|
||||
(package! helm-css-scss)
|
||||
(package! helm-describe-modes :recipe (:fetcher github :repo "emacs-helm/helm-describe-modes"))
|
||||
(package! helm-projectile)
|
||||
(package! helm-swoop)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; emacs/ido/config.el
|
||||
|
||||
(@def-package ido
|
||||
(def-package! ido
|
||||
:init
|
||||
(setq ido-ignore-buffers
|
||||
'("\\` " "^\\*ESS\\*" "^\\*Messages\\*" "^\\*Help\\*" "^\\*Buffer"
|
||||
|
@ -24,12 +24,12 @@
|
|||
(ido-everywhere 1)
|
||||
(require 'ido-ubiquitous)
|
||||
|
||||
(@add-hook ido-setup
|
||||
(add-hook! ido-setup
|
||||
(require 'ido-vertical-mode)
|
||||
(require 'flx-ido)
|
||||
(require 'crm-custom)
|
||||
|
||||
(@map :map (ido-common-completion-map ido-completion-map ido-file-completion-map)
|
||||
(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))
|
||||
|
@ -47,21 +47,21 @@
|
|||
(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)
|
||||
(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 "/")
|
||||
(λ! (if (looking-back "/")
|
||||
(insert "~/")
|
||||
(call-interactively 'self-insert-command)))))
|
||||
(add-hook 'ido-setup-hook '+ido|setup-home-keybind))
|
||||
|
||||
|
||||
(@def-package ido-ubiquitous :config (ido-ubiquitous-mode 1))
|
||||
(def-package! ido-ubiquitous :config (ido-ubiquitous-mode 1))
|
||||
|
||||
(@def-package ido-vertical-mode :config (ido-vertical-mode 1))
|
||||
(def-package! ido-vertical-mode :config (ido-vertical-mode 1))
|
||||
|
||||
(@def-package flx-ido :config (flx-ido-mode +1))
|
||||
(def-package! flx-ido :config (flx-ido-mode +1))
|
||||
|
||||
(@def-package crm-custom :config (crm-custom-mode +1))
|
||||
(def-package! crm-custom :config (crm-custom-mode +1))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; emacs/ido/packages.el
|
||||
|
||||
(@package flx-ido)
|
||||
(@package ido-ubiquitous)
|
||||
(@package ido-vertical-mode)
|
||||
(@package crm-custom)
|
||||
(package! flx-ido)
|
||||
(package! ido-ubiquitous)
|
||||
(package! ido-vertical-mode)
|
||||
(package! crm-custom)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
;; `counsel-imenu'.
|
||||
|
||||
;; TODO Make this a setting
|
||||
(defmacro @def-counsel-action (name &rest forms)
|
||||
(defmacro def-counsel-action! (name &rest forms)
|
||||
`(defun ,(intern (format "+ivy/counsel-%s" (symbol-name name))) ()
|
||||
(interactive)
|
||||
(ivy-set-action ',@forms)
|
||||
|
@ -22,7 +22,7 @@
|
|||
;; Packages
|
||||
;;
|
||||
|
||||
(@def-package ivy :demand t
|
||||
(def-package! ivy :demand t
|
||||
:config
|
||||
(setq ivy-height 14
|
||||
ivy-do-completion-in-region nil
|
||||
|
@ -33,12 +33,12 @@
|
|||
;; highlight til EOL
|
||||
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
|
||||
(map! :map ivy-minibuffer-map
|
||||
[escape] 'keyboard-escape-quit
|
||||
"C-r" 'evil-paste-from-register
|
||||
"M-v" 'clipboard-yank
|
||||
|
@ -47,7 +47,7 @@
|
|||
"C-b" 'backward-word
|
||||
"C-f" 'forward-word)
|
||||
|
||||
(@map :map ivy-mode-map
|
||||
(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
|
||||
|
@ -59,7 +59,7 @@
|
|||
[remap imenu-anywhere] 'ivy-imenu-anywhere
|
||||
[remap execute-extended-command] 'counsel-M-x)
|
||||
|
||||
(when (@featurep :feature workspaces)
|
||||
(when (featurep! :feature workspaces)
|
||||
(nconc ivy-sort-functions-alist
|
||||
'((persp-kill-buffer . nil)
|
||||
(persp-remove-buffer . nil)
|
||||
|
@ -71,20 +71,20 @@
|
|||
(+workspace/delete . nil)))))
|
||||
|
||||
|
||||
(@def-package swiper :commands (swiper swiper-all))
|
||||
(def-package! swiper :commands (swiper swiper-all))
|
||||
|
||||
|
||||
(@def-package counsel
|
||||
(def-package! counsel
|
||||
:after ivy
|
||||
:config
|
||||
(setq counsel-find-file-ignore-regexp "\\(?:^[#.]\\)\\|\\(?:[#~]$\\)\\|\\(?:^Icon?\\)")
|
||||
|
||||
(@set :popup "^\\*ivy-occur counsel-ag" :size 25 :regexp t :autokill t)
|
||||
(set! :popup "^\\*ivy-occur counsel-ag" :size 25 :regexp t :autokill t)
|
||||
|
||||
(require 'counsel-projectile)
|
||||
|
||||
;; FIXME Messy workaround, refactor this
|
||||
(@def-counsel-action ag-open-in-other-window
|
||||
(def-counsel-action! ag-open-in-other-window
|
||||
(lambda (x)
|
||||
(when (string-match "\\`\\(.*?\\):\\([0-9]+\\):\\(.*\\)\\'" x)
|
||||
(let ((file-name (match-string-no-properties 1 x))
|
||||
|
@ -104,21 +104,21 @@
|
|||
(when dest-win
|
||||
(select-window dest-win))))))
|
||||
|
||||
(@add-hook 'doom-popup-mode-hook
|
||||
(add-hook! 'doom-popup-mode-hook
|
||||
(when (eq major-mode 'ivy-occur-grep-mode)
|
||||
(ivy-wgrep-change-to-wgrep-mode)))
|
||||
|
||||
(defun +ivy*recenter (&rest _) (recenter))
|
||||
(advice-add 'counsel-ag-function :override '+ivy*counsel-ag-function)
|
||||
(advice-add 'imenu :after '+ivy*recenter)
|
||||
(@map :map counsel-ag-map
|
||||
(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))
|
||||
|
||||
|
||||
;; Used by `counsel-M-x'
|
||||
(@def-package smex
|
||||
(def-package! smex
|
||||
:commands (smex smex-major-mode-commands)
|
||||
:config
|
||||
(setq smex-save-file (concat doom-cache-dir "/smex-items"))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; completion/ivy/packages.el
|
||||
|
||||
(@package ivy)
|
||||
(@package counsel)
|
||||
(@package counsel-projectile)
|
||||
(@package smex)
|
||||
(@package swiper)
|
||||
(package! ivy)
|
||||
(package! counsel)
|
||||
(package! counsel-projectile)
|
||||
(package! smex)
|
||||
(package! swiper)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue