Update for use-package 2.0

This commit is contained in:
Henrik Lissner 2015-03-17 02:35:59 -04:00
parent e0923b2d9c
commit ee2a3380e7
7 changed files with 63 additions and 67 deletions

View file

@ -1,16 +1,16 @@
(use-package flycheck
: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
(dolist (hook '(ruby-mode-hook
python-mode-hook
shell-mode-hook
))
(add-hook hook 'flycheck-mode))
(progn
(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))
(dolist (hook '(ruby-mode-hook
python-mode-hook
shell-mode-hook
))
(add-hook hook 'flycheck-mode)))
:config
(progn ; flycheck settings
(my--cleanup-buffers-add "^\\*Flycheck.*\\*$")

View file

@ -1,13 +1,13 @@
(use-package projectile
:pre-load
:init
(setq-default projectile-cache-file (concat my-tmp-dir "projectile.cache")
projectile-known-projects-file (concat my-tmp-dir "projectile.projects")
projectile-enable-caching t
projectile-indexing-method 'alien)
:init
(projectile-global-mode +1)
:config
(progn
(projectile-global-mode +1)
(add-to-list 'projectile-globally-ignored-files "ido.last")
(add-to-list 'projectile-globally-ignored-directories "assets")
(add-to-list 'projectile-other-file-alist '("scss" "css"))

View file

@ -69,7 +69,7 @@
(use-package rspec-mode
:defer t
:pre-load
:init
(progn
(defvar rspec-mode-verifiable-map (make-sparse-keymap))
(defvar evilmi-ruby-match-tags

View file

@ -4,25 +4,24 @@
(use-package markdown-mode
:mode (("\\.md$" . markdown-mode)
("/README$" . markdown-mode))
:pre-load
(progn
;; Implement strike-through formatting
(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))))))
:init
;; Implement strike-through formatting
(defvar markdown-regex-del "\\(^\\|[^\\]\\)\\(\\(~\\{2\\}\\)\\([^ \n \\]\\|[^ \n ]\\(?:.\\|\n[^\n]\\)*?[^\\ ]\\)\\(\\3\\)\\)")
:config
(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))
(let ((map markdown-mode-map))

View file

@ -1,23 +1,22 @@
(use-package yasnippet
:mode (("emacs\\.d/snippets/.+$" . snippet-mode))
:pre-load
:init
(defvar yas-minor-mode-map
;; Fix yasnippet keymaps so they only work in insert mode
(let ((map (make-sparse-keymap)))
;; Fix yasnippet keymaps so they only work in insert mode
(let ((map (make-sparse-keymap)))
(bind 'insert map [(tab)] 'yas-expand)
(bind 'insert map (kbd "TAB") 'yas-expand)
(bind 'visual map (kbd "<backtab>") 'yas-insert-snippet)
map))
:init
:config
(progn
(add-hook 'snippet-mode-hook 'disable-final-newline)
(add-hook 'snippet-mode-hook 'yas-minor-mode)
(add-hook 'text-mode-hook 'yas-minor-mode)
(add-hook 'prog-mode-hook 'yas-minor-mode)
;; (add-hook 'markdown-mode-hook 'yas-minor-mode)
(add-hook 'org-mode-hook 'yas-minor-mode))
:config
(progn
(add-hook 'org-mode-hook 'yas-minor-mode)
(setq yas-verbosity 0)
(setq yas-indent-line 'auto)
(setq yas-also-auto-indent-first-line t)