Move stuff around - make sure every package uses use-package
This commit is contained in:
parent
1c6db3ede5
commit
59c55935b8
@ -17,13 +17,13 @@
|
||||
|
||||
(setq init-packages/editing-packages
|
||||
|
||||
'(rainbow-mode
|
||||
whole-line-or-region
|
||||
duplicate-thing
|
||||
'(duplicate-thing
|
||||
expand-region
|
||||
fill-column-indicator
|
||||
volatile-highlights
|
||||
rainbow-mode
|
||||
undo-tree
|
||||
volatile-highlights
|
||||
whole-line-or-region
|
||||
ws-butler)
|
||||
|
||||
)
|
||||
@ -59,12 +59,11 @@
|
||||
(add-hook 'text-mode-hook 'fci-mode))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Volatile highlights - highlight changes caused by undo, yank, etc.
|
||||
;; Rainbow mode.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(use-package volatile-highlights
|
||||
:init
|
||||
(volatile-highlights-mode t))
|
||||
(use-package rainbow-mode
|
||||
:defer t)
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Undo tree. To undo "C-\", to redo "C-_", undo tree "C-x u".
|
||||
@ -75,15 +74,31 @@
|
||||
(global-undo-tree-mode))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Use UTF-8.
|
||||
;; Volatile highlights - highlight changes caused by undo, yank, etc.
|
||||
;; --------------------------------------------------------------------------
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
(set-language-environment "UTF-8")
|
||||
(prefer-coding-system 'utf-8)
|
||||
|
||||
(use-package volatile-highlights
|
||||
:init
|
||||
(volatile-highlights-mode t))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Convenient editing settings.
|
||||
;; Kill line when calling kill-region without a selected region.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(use-package whole-line-or-region
|
||||
:init
|
||||
(whole-line-or-region-global-mode t))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; `ws-butler' will cleanup whitespace on all modified files on save.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(use-package ws-butler
|
||||
:init
|
||||
(ws-butler-global-mode))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Non-package related editing settings.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
;; Kill whole line when point at beginning of line.
|
||||
@ -92,11 +107,13 @@
|
||||
;; Replace selected rather than inserting text at point.
|
||||
(delete-selection-mode)
|
||||
|
||||
;; Kill line when calling kill-region without a selected region.
|
||||
(whole-line-or-region-global-mode t)
|
||||
|
||||
;; `ws-butler' will cleanup whitespace on all modified files on save.
|
||||
(ws-butler-global-mode)
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Use UTF-8.
|
||||
;; --------------------------------------------------------------------------
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
(set-keyboard-coding-system 'utf-8)
|
||||
(set-language-environment "UTF-8")
|
||||
(prefer-coding-system 'utf-8)
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Formatting
|
||||
|
@ -100,23 +100,25 @@
|
||||
;; Configure `ibuffer'.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(add-hook 'ibuffer-hook
|
||||
(lambda ()
|
||||
(ibuffer-vc-set-filter-groups-by-vc-root)
|
||||
(unless (eq ibuffer-sorting-mode 'alphabetic)
|
||||
(ibuffer-do-sort-by-alphabetic))))
|
||||
|
||||
(setq ibuffer-formats
|
||||
'((mark modified read-only vc-status-mini " "
|
||||
(name 36 36 :left :elide)
|
||||
" "
|
||||
(size 9 -1 :right)
|
||||
" "
|
||||
(mode 16 16 :left :elide)
|
||||
" "
|
||||
(vc-status 16 16 :left)
|
||||
" "
|
||||
filename-and-process)))
|
||||
(use-package ibuffer-vc
|
||||
:init
|
||||
(add-hook 'ibuffer-hook
|
||||
(lambda ()
|
||||
(ibuffer-vc-set-filter-groups-by-vc-root)
|
||||
(unless (eq ibuffer-sorting-mode 'alphabetic)
|
||||
((insert )buffer-do-sort-by-alphabetic))))
|
||||
:config
|
||||
(setq ibuffer-formats
|
||||
'((mark modified read-only vc-status-mini " "
|
||||
(name 36 36 :left :elide)
|
||||
" "
|
||||
(size 9 -1 :right)
|
||||
" "
|
||||
(mode 16 16 :left :elide)
|
||||
" "
|
||||
(vc-(setq )tatus 16 16 :left)
|
||||
" "
|
||||
filename-and-process))))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Aliases.
|
||||
|
@ -39,7 +39,6 @@
|
||||
("C-h SPC" . helm-all-mark-rings))
|
||||
:config
|
||||
(require 'helm-config)
|
||||
(require 'helm-descbinds)
|
||||
|
||||
;; Helm prefix ------------------------------------------------------------
|
||||
|
||||
@ -109,16 +108,19 @@
|
||||
;; Activate helm-descbinds.
|
||||
;; ------------------------------------------------------------------------
|
||||
|
||||
(helm-descbinds-mode)
|
||||
(use-package helm-descbinds
|
||||
:init
|
||||
(helm-descbinds-mode))
|
||||
|
||||
;; ------------------------------------------------------------------------
|
||||
;; Configure projectile.
|
||||
;; ------------------------------------------------------------------------
|
||||
|
||||
(projectile-global-mode)
|
||||
(setq-default projectile-completion-system 'helm)
|
||||
(helm-projectile-on)
|
||||
|
||||
)
|
||||
(use-package helm-projectile
|
||||
:init
|
||||
(projectile-global-mode)
|
||||
:config
|
||||
(setq-default projectile-completion-system 'helm)
|
||||
(helm-projectile-on)))
|
||||
|
||||
)
|
||||
|
@ -26,6 +26,14 @@
|
||||
|
||||
(defun init-packages/init-programming ()
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Enable yasnippet.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(use-package yasnippet
|
||||
:init
|
||||
(yas-global-mode 1))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Line numbers.
|
||||
;;
|
||||
@ -58,14 +66,6 @@
|
||||
|
||||
(setq-default c-default-style "linux")
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Enable yasnippet.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
||||
(use-package yasnippet
|
||||
:init
|
||||
(yas-global-mode 1))
|
||||
|
||||
;; --------------------------------------------------------------------------
|
||||
;; Trailing whitespace.
|
||||
;; --------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user