@use-package => @def-package
This commit is contained in:
parent
0f5dbd0bac
commit
cf927acc07
10 changed files with 25 additions and 32 deletions
|
@ -1,5 +1,4 @@
|
|||
;;; feature/evil/config.el
|
||||
(provide '+evil)
|
||||
|
||||
;; I'm a vimmer at heart. Its modal philosophy suits me better, and this module
|
||||
;; strives to make Emacs a much better vim than vim was.
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
;;; feature/version-control/+git.el
|
||||
|
||||
(@use-package gitconfig-mode
|
||||
(@def-package gitconfig-mode
|
||||
:mode "/\\.?git/?config$"
|
||||
:mode "/\\.gitmodules$"
|
||||
:init (add-hook 'gitconfig-mode-hook 'flyspell-mode))
|
||||
|
||||
(@use-package gitignore-mode
|
||||
(@def-package gitignore-mode
|
||||
:mode "/\\.?git/?config$"
|
||||
:mode "/\\.gitmodules$")
|
||||
|
||||
|
||||
(@use-package git-gutter-fringe
|
||||
(@def-package git-gutter-fringe
|
||||
:commands git-gutter-mode
|
||||
:init (@add-hook (text-mode prog-mode conf-mode) 'git-gutter-mode)
|
||||
:config
|
||||
|
@ -24,20 +24,17 @@
|
|||
(advice-add 'evil-force-normal-state :after 'git-gutter)))
|
||||
|
||||
|
||||
(@use-package browse-at-remote
|
||||
(@def-package browse-at-remote
|
||||
:commands (browse-at-remote/browse browse-at-remote/get-url))
|
||||
|
||||
|
||||
(@use-package magit
|
||||
(@def-package magit
|
||||
:commands magit-status
|
||||
:config
|
||||
(@set :popup "^\\*magit.+" :regexp t)
|
||||
(@after evil-snipe
|
||||
|
||||
(@after evil
|
||||
(require 'evil-magit)
|
||||
;; evil-snipe conflicts with magit
|
||||
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)))
|
||||
|
||||
|
||||
(@use-package evil-magit
|
||||
:when (featurep 'evil)
|
||||
:after magit)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; feature/version-control/autoload.el
|
||||
|
||||
;;;###autoload
|
||||
(defun +vcs-git-root ()
|
||||
(defun +vcs-root ()
|
||||
"Get git url root."
|
||||
(-when-let (url (car-safe (browse-at-remote--remote-ref buffer-file-name)))
|
||||
(cdr (browse-at-remote--get-url-from-remote url))))
|
||||
|
@ -27,6 +27,6 @@ Fallback to repository root."
|
|||
(defun +vcs/git-browse-issues ()
|
||||
"Open the github issues page for current repo."
|
||||
(interactive)
|
||||
(if-let (root (+vcs-git-root))
|
||||
(if-let (root (+vcs-root))
|
||||
(browse-url (concat root "/issues"))
|
||||
(user-error "No git root found!")))
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
;;; feature/version-control/config.el
|
||||
(provide '+version-control)
|
||||
|
||||
(@load +git)
|
||||
;; (@load +hg)
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
|
||||
;;; +git
|
||||
(@package browse-at-remote)
|
||||
(@package evil-magit :needs evil)
|
||||
(@package git-gutter-fringe)
|
||||
(@package gitconfig-mode)
|
||||
(@package gitignore-mode)
|
||||
(@package magit)
|
||||
|
||||
(when (@featurep :feature evil)
|
||||
(@package evil-magit))
|
||||
|
||||
;;; TODO +hg
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"A hook that runs when persp loads a new session.")
|
||||
|
||||
|
||||
(@use-package persp-mode :demand t
|
||||
(@def-package persp-mode :demand t
|
||||
:init
|
||||
(setq persp-autokill-buffer-on-remove 'kill-weak
|
||||
persp-nil-name "main"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
;;; lang/emacs-lisp/config.el
|
||||
(provide '+emacs-lisp)
|
||||
|
||||
(@use-package elisp-mode
|
||||
(@def-package elisp-mode
|
||||
:mode ("/Cask$" . emacs-lisp-mode)
|
||||
:init
|
||||
(@add-hook emacs-lisp-mode '(highlight-quoted-mode auto-compile-on-save-mode +emacs-lisp|hook))
|
||||
|
@ -57,17 +56,17 @@
|
|||
;; Plugins
|
||||
;;
|
||||
|
||||
(@use-package auto-compile
|
||||
(@def-package auto-compile
|
||||
:commands auto-compile-on-save-mode
|
||||
:config
|
||||
(setq auto-compile-display-buffer nil
|
||||
auto-compile-use-mode-line nil))
|
||||
|
||||
|
||||
(@use-package highlight-quoted
|
||||
(@def-package highlight-quoted
|
||||
:commands highlight-quoted-mode)
|
||||
|
||||
|
||||
(@use-package slime
|
||||
(@def-package slime
|
||||
:config (setq inferior-lisp-program "clisp"))
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
;; lang/javascript/config.el
|
||||
(provide '+javascript)
|
||||
|
||||
(@use-package js2-mode
|
||||
(@def-package js2-mode
|
||||
:mode "\\.js$"
|
||||
:interpreter "node"
|
||||
:init
|
||||
|
@ -48,13 +47,13 @@
|
|||
(:n js2r-forward-slurp "forward slurp")
|
||||
(:n js2r-forward-barf "forward barf")))
|
||||
|
||||
(@use-package js2-refactor :after emr)
|
||||
(@def-package js2-refactor :after emr)
|
||||
|
||||
(@use-package company-tern :commands company-tern :after tern)
|
||||
(@def-package company-tern :commands company-tern :after tern)
|
||||
|
||||
(@use-package jsx-mode :mode "\\.jsx$")
|
||||
(@def-package jsx-mode :mode "\\.jsx$")
|
||||
|
||||
(@use-package coffee-mode
|
||||
(@def-package coffee-mode
|
||||
:mode "\\.coffee$"
|
||||
:init (setq coffee-indent-like-python-mode t))
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
;;; os/macos/config.el
|
||||
(provide '+macos)
|
||||
|
||||
(setq mac-command-modifier 'meta
|
||||
mac-option-modifier 'alt
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
;;; ui/doom/config.el
|
||||
(provide '+doom)
|
||||
|
||||
(defvar +doom-theme 'doom-one
|
||||
"The color theme currently in use.")
|
||||
|
@ -41,7 +40,7 @@
|
|||
;; Apply the doom-one theme from `doom-themes' for full compatibility; gives
|
||||
;; Emacs a look inspired by Dark One in Atom.
|
||||
;; <https://github.com/hlissner/emacs-doom-theme>
|
||||
(@use-package doom-themes :demand t
|
||||
(@def-package doom-themes :demand t
|
||||
:load-path "~/work/plugins/emacs-doom-theme"
|
||||
:config
|
||||
(load-theme +doom-theme t)
|
||||
|
@ -66,7 +65,7 @@
|
|||
;; Causes a flash around the cursor when it moves across a "large" distance.
|
||||
;; Usually between windows, or across files. This makes it easier to keep track
|
||||
;; where your cursor is, which I find helpful on my 30" 2560x1600 display.
|
||||
(@use-package beacon :demand t
|
||||
(@def-package beacon :demand t
|
||||
:config
|
||||
(beacon-mode +1)
|
||||
(setq beacon-color (let ((bg (face-attribute 'highlight :background nil t)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue