Update for use-package 2.0
This commit is contained in:
parent
e0923b2d9c
commit
ee2a3380e7
7 changed files with 63 additions and 67 deletions
|
@ -2,26 +2,26 @@
|
||||||
|
|
||||||
;;;; Eeeeeeevil ;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;; Eeeeeeevil ;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:pre-load
|
|
||||||
(setq evil-want-visual-char-semi-exclusive t
|
|
||||||
evil-search-module 'evil-search
|
|
||||||
evil-search-wrap nil
|
|
||||||
evil-magic 'magic
|
|
||||||
evil-want-C-u-scroll t ; enable C-u for scrolling
|
|
||||||
evil-ex-visual-char-range t ; column range for ex commands
|
|
||||||
evil-ex-search-vim-style-regexp t
|
|
||||||
|
|
||||||
;; Color-coded state cursors
|
|
||||||
evil-normal-state-cursor '("white" box)
|
|
||||||
evil-emacs-state-cursor '("cyan" bar)
|
|
||||||
evil-insert-state-cursor '("white" bar)
|
|
||||||
evil-visual-state-cursor 'hollow
|
|
||||||
|
|
||||||
ace-jump-mode-scope 'window
|
|
||||||
ace-jump-mode-move-keys (nconc (loop for i from ?a to ?z collect i)
|
|
||||||
(loop for i from ?A to ?Z collect i)))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(setq evil-want-visual-char-semi-exclusive t
|
||||||
|
evil-search-module 'evil-search
|
||||||
|
evil-search-wrap nil
|
||||||
|
evil-magic 'magic
|
||||||
|
evil-want-C-u-scroll t ; enable C-u for scrolling
|
||||||
|
evil-ex-visual-char-range t ; column range for ex commands
|
||||||
|
evil-ex-search-vim-style-regexp t
|
||||||
|
|
||||||
|
;; Color-coded state cursors
|
||||||
|
evil-normal-state-cursor '("white" box)
|
||||||
|
evil-emacs-state-cursor '("cyan" bar)
|
||||||
|
evil-insert-state-cursor '("white" bar)
|
||||||
|
evil-visual-state-cursor 'hollow
|
||||||
|
|
||||||
|
ace-jump-mode-scope 'window
|
||||||
|
ace-jump-mode-move-keys (nconc (loop for i from ?a to ?z collect i)
|
||||||
|
(loop for i from ?A to ?Z collect i)))
|
||||||
|
|
||||||
(evil-mode)
|
(evil-mode)
|
||||||
;; Always ensure evil-shift-width is consistent with tab-width
|
;; Always ensure evil-shift-width is consistent with tab-width
|
||||||
(add-hook! 'find-file-hook (setq evil-shift-width tab-width))
|
(add-hook! 'find-file-hook (setq evil-shift-width tab-width))
|
||||||
|
@ -62,16 +62,16 @@
|
||||||
(use-package evil-numbers)
|
(use-package evil-numbers)
|
||||||
|
|
||||||
(use-package evil-matchit
|
(use-package evil-matchit
|
||||||
:init (global-evil-matchit-mode 1))
|
:config (global-evil-matchit-mode 1))
|
||||||
|
|
||||||
(use-package evil-surround
|
(use-package evil-surround
|
||||||
:init (global-evil-surround-mode 1))
|
:config (global-evil-surround-mode 1))
|
||||||
|
|
||||||
(use-package evil-nerd-commenter
|
(use-package evil-nerd-commenter
|
||||||
:pre-load (setq evilnc-hotkey-comment-operator "gc"))
|
:init (setq evilnc-hotkey-comment-operator "gc"))
|
||||||
|
|
||||||
(use-package evil-jumper
|
(use-package evil-jumper
|
||||||
:pre-load (setq evil-jumper-file (expand-file-name "jumplist" my-tmp-dir))
|
:init (setq evil-jumper-file (expand-file-name "jumplist" my-tmp-dir))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq evil-jumper-auto-center t
|
(setq evil-jumper-auto-center t
|
||||||
|
@ -79,13 +79,14 @@
|
||||||
(define-key evil-motion-state-map (kbd "H-i") 'evil-jumper/forward)))
|
(define-key evil-motion-state-map (kbd "H-i") 'evil-jumper/forward)))
|
||||||
|
|
||||||
(use-package evil-snipe
|
(use-package evil-snipe
|
||||||
:init (global-evil-snipe-mode)
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(global-evil-snipe-mode +1)
|
||||||
|
|
||||||
(setq evil-snipe-smart-case t)
|
(setq evil-snipe-smart-case t)
|
||||||
(setq evil-snipe-override-evil t)
|
(setq evil-snipe-override-evil t)
|
||||||
(setq evil-snipe-scope 'visible)
|
(setq evil-snipe-scope 'visible)
|
||||||
(setq evil-snipe-repeat-scope 'whole-visible)
|
(setq evil-snipe-repeat-scope 'buffer)
|
||||||
|
|
||||||
(setq-default evil-snipe-symbol-groups
|
(setq-default evil-snipe-symbol-groups
|
||||||
'((?\[ "[[{(]")
|
'((?\[ "[[{(]")
|
||||||
|
@ -94,9 +95,6 @@
|
||||||
(bind 'visual "z" 'evil-snipe-s)
|
(bind 'visual "z" 'evil-snipe-s)
|
||||||
(bind 'visual "Z" 'evil-snipe-S)))
|
(bind 'visual "Z" 'evil-snipe-S)))
|
||||||
|
|
||||||
(use-package ace-window
|
|
||||||
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
|
|
||||||
|
|
||||||
(use-package evil-visualstar))
|
(use-package evil-visualstar))
|
||||||
|
|
||||||
(bind evil-ex-completion-map
|
(bind evil-ex-completion-map
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
(cd "~") ; instead of /
|
(cd "~") ; instead of /
|
||||||
|
|
||||||
(require 'use-package) ; Package management bootstrap
|
(eval-when-compile (require 'use-package)) ; Package management bootstrap
|
||||||
(setq use-package-verbose DEBUG-MODE)
|
(setq use-package-verbose DEBUG-MODE)
|
||||||
|
|
||||||
;; Make sure undo/backup folders exist
|
;; Make sure undo/backup folders exist
|
||||||
|
@ -211,9 +211,9 @@
|
||||||
(add-hook 'after-load-functions 'smex-update-after-load)))
|
(add-hook 'after-load-functions 'smex-update-after-load)))
|
||||||
|
|
||||||
(use-package popwin
|
(use-package popwin
|
||||||
:init (popwin-mode 1)
|
|
||||||
:config
|
:config
|
||||||
(progn ; popwin config
|
(progn ; popwin config
|
||||||
|
(popwin-mode 1)
|
||||||
(setq popwin:popup-window-height 0.45)
|
(setq popwin:popup-window-height 0.45)
|
||||||
|
|
||||||
(push '(diff-mode :position bottom :stick t) popwin:special-display-config)
|
(push '(diff-mode :position bottom :stick t) popwin:special-display-config)
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
(use-package flycheck
|
(use-package flycheck
|
||||||
:defer t
|
:defer t
|
||||||
:pre-load
|
|
||||||
(setq-default flycheck-indication-mode 'right-fringe
|
|
||||||
;; Removed checks on idle/change for snappiness
|
|
||||||
flycheck-check-syntax-automatically '(save mode-enabled)
|
|
||||||
flycheck-disabled-checkers '(emacs-lisp-checkdoc emacs-lisp make))
|
|
||||||
:init
|
:init
|
||||||
(dolist (hook '(ruby-mode-hook
|
(progn
|
||||||
python-mode-hook
|
(setq-default flycheck-indication-mode 'right-fringe
|
||||||
shell-mode-hook
|
;; Removed checks on idle/change for snappiness
|
||||||
))
|
flycheck-check-syntax-automatically '(save mode-enabled)
|
||||||
(add-hook hook 'flycheck-mode))
|
flycheck-disabled-checkers '(emacs-lisp-checkdoc emacs-lisp make))
|
||||||
|
(dolist (hook '(ruby-mode-hook
|
||||||
|
python-mode-hook
|
||||||
|
shell-mode-hook
|
||||||
|
))
|
||||||
|
(add-hook hook 'flycheck-mode)))
|
||||||
:config
|
:config
|
||||||
(progn ; flycheck settings
|
(progn ; flycheck settings
|
||||||
(my--cleanup-buffers-add "^\\*Flycheck.*\\*$")
|
(my--cleanup-buffers-add "^\\*Flycheck.*\\*$")
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:pre-load
|
:init
|
||||||
(setq-default projectile-cache-file (concat my-tmp-dir "projectile.cache")
|
(setq-default projectile-cache-file (concat my-tmp-dir "projectile.cache")
|
||||||
projectile-known-projects-file (concat my-tmp-dir "projectile.projects")
|
projectile-known-projects-file (concat my-tmp-dir "projectile.projects")
|
||||||
projectile-enable-caching t
|
projectile-enable-caching t
|
||||||
projectile-indexing-method 'alien)
|
projectile-indexing-method 'alien)
|
||||||
:init
|
|
||||||
(projectile-global-mode +1)
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(projectile-global-mode +1)
|
||||||
|
|
||||||
(add-to-list 'projectile-globally-ignored-files "ido.last")
|
(add-to-list 'projectile-globally-ignored-files "ido.last")
|
||||||
(add-to-list 'projectile-globally-ignored-directories "assets")
|
(add-to-list 'projectile-globally-ignored-directories "assets")
|
||||||
(add-to-list 'projectile-other-file-alist '("scss" "css"))
|
(add-to-list 'projectile-other-file-alist '("scss" "css"))
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
(use-package rspec-mode
|
(use-package rspec-mode
|
||||||
:defer t
|
:defer t
|
||||||
:pre-load
|
:init
|
||||||
(progn
|
(progn
|
||||||
(defvar rspec-mode-verifiable-map (make-sparse-keymap))
|
(defvar rspec-mode-verifiable-map (make-sparse-keymap))
|
||||||
(defvar evilmi-ruby-match-tags
|
(defvar evilmi-ruby-match-tags
|
||||||
|
|
|
@ -4,25 +4,24 @@
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:mode (("\\.md$" . markdown-mode)
|
:mode (("\\.md$" . markdown-mode)
|
||||||
("/README$" . markdown-mode))
|
("/README$" . markdown-mode))
|
||||||
:pre-load
|
:init
|
||||||
(progn
|
;; Implement strike-through formatting
|
||||||
;; Implement strike-through formatting
|
(defvar markdown-regex-del "\\(^\\|[^\\]\\)\\(\\(~\\{2\\}\\)\\([^ \n \\]\\|[^ \n ]\\(?:.\\|\n[^\n]\\)*?[^\\ ]\\)\\(\\3\\)\\)")
|
||||||
(defvar markdown-regex-del "\\(^\\|[^\\]\\)\\(\\(~\\{2\\}\\)\\([^ \n \\]\\|[^ \n ]\\(?:.\\|\n[^\n]\\)*?[^\\ ]\\)\\(\\3\\)\\)")
|
|
||||||
(defun markdown-insert-del ()
|
|
||||||
(interactive)
|
|
||||||
(let ((delim "~~"))
|
|
||||||
(if (markdown-use-region-p)
|
|
||||||
;; Active region
|
|
||||||
(let ((bounds (markdown-unwrap-things-in-region
|
|
||||||
(region-beginning) (region-end)
|
|
||||||
markdown-regex-del 2 4)))
|
|
||||||
(markdown-wrap-or-insert delim delim nil (car bounds) (cdr bounds)))
|
|
||||||
;; Bold markup removal, bold word at point, or empty markup insertion
|
|
||||||
(if (thing-at-point-looking-at markdown-regex-del)
|
|
||||||
(markdown-unwrap-thing-at-point nil 2 4)
|
|
||||||
(markdown-wrap-or-insert delim delim 'word nil nil))))))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
(defun markdown-insert-del ()
|
||||||
|
(interactive)
|
||||||
|
(let ((delim "~~"))
|
||||||
|
(if (markdown-use-region-p)
|
||||||
|
;; Active region
|
||||||
|
(let ((bounds (markdown-unwrap-things-in-region
|
||||||
|
(region-beginning) (region-end)
|
||||||
|
markdown-regex-del 2 4)))
|
||||||
|
(markdown-wrap-or-insert delim delim nil (car bounds) (cdr bounds)))
|
||||||
|
;; Bold markup removal, bold word at point, or empty markup insertion
|
||||||
|
(if (thing-at-point-looking-at markdown-regex-del)
|
||||||
|
(markdown-unwrap-thing-at-point nil 2 4)
|
||||||
|
(markdown-wrap-or-insert delim delim 'word nil nil)))))
|
||||||
(sp-local-pair 'markdown-mode "*" "*" :unless '(sp-point-after-bol-p sp-point-before-same-p sp-point-after-same-p))
|
(sp-local-pair 'markdown-mode "*" "*" :unless '(sp-point-after-bol-p sp-point-before-same-p sp-point-after-same-p))
|
||||||
|
|
||||||
(let ((map markdown-mode-map))
|
(let ((map markdown-mode-map))
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:mode (("emacs\\.d/snippets/.+$" . snippet-mode))
|
:mode (("emacs\\.d/snippets/.+$" . snippet-mode))
|
||||||
:pre-load
|
:init
|
||||||
(defvar yas-minor-mode-map
|
(defvar yas-minor-mode-map
|
||||||
;; Fix yasnippet keymaps so they only work in insert mode
|
;; Fix yasnippet keymaps so they only work in insert mode
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
(bind 'insert map [(tab)] 'yas-expand)
|
(bind 'insert map [(tab)] 'yas-expand)
|
||||||
(bind 'insert map (kbd "TAB") 'yas-expand)
|
(bind 'insert map (kbd "TAB") 'yas-expand)
|
||||||
(bind 'visual map (kbd "<backtab>") 'yas-insert-snippet)
|
(bind 'visual map (kbd "<backtab>") 'yas-insert-snippet)
|
||||||
map))
|
map))
|
||||||
:init
|
:config
|
||||||
(progn
|
(progn
|
||||||
(add-hook 'snippet-mode-hook 'disable-final-newline)
|
(add-hook 'snippet-mode-hook 'disable-final-newline)
|
||||||
(add-hook 'snippet-mode-hook 'yas-minor-mode)
|
(add-hook 'snippet-mode-hook 'yas-minor-mode)
|
||||||
(add-hook 'text-mode-hook 'yas-minor-mode)
|
(add-hook 'text-mode-hook 'yas-minor-mode)
|
||||||
(add-hook 'prog-mode-hook 'yas-minor-mode)
|
(add-hook 'prog-mode-hook 'yas-minor-mode)
|
||||||
;; (add-hook 'markdown-mode-hook 'yas-minor-mode)
|
;; (add-hook 'markdown-mode-hook 'yas-minor-mode)
|
||||||
(add-hook 'org-mode-hook 'yas-minor-mode))
|
(add-hook 'org-mode-hook 'yas-minor-mode)
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(setq yas-verbosity 0)
|
(setq yas-verbosity 0)
|
||||||
(setq yas-indent-line 'auto)
|
(setq yas-indent-line 'auto)
|
||||||
(setq yas-also-auto-indent-first-line t)
|
(setq yas-also-auto-indent-first-line t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue