Move various packages from core into separate modules

This commit is contained in:
2017-08-08 01:38:44 +01:00
parent f488821a33
commit 2644dc6405
10 changed files with 122 additions and 34 deletions

View File

@@ -49,11 +49,6 @@
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
;; autosave the undo-tree history
(setq undo-tree-history-directory-alist
`((".*" . ,temporary-file-directory)))
(setq undo-tree-auto-save-history t)
;; smart tab behavior - indent or complete
(setq tab-always-indent 'complete)
@@ -136,22 +131,10 @@
indentation space-after-tab tab-mark newline-mark
empty)))
;; flyspell setup
(require 'flyspell)
(diminish 'flyspell-mode)
(setq ispell-program-name "aspell" ; use aspell instead of ispell
ispell-extra-args '("--sug-mode=ultra"))
;; enabled change region case commands
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;; smarter kill-ring navigation
(require 'browse-kill-ring)
(browse-kill-ring-default-keybindings)
(global-set-key (kbd "s-y") 'browse-kill-ring)
;; automatically indenting yanked text if in programming-modes
(defun yank-advised-indent-function (beg end)
"Do indentation, as long as the region isn't too large."
@@ -189,14 +172,6 @@ indent yanked text (with prefix arg don't indent)."
(require 're-builder)
(setq reb-re-syntax 'string)
;; sensible undo
(global-undo-tree-mode)
(diminish 'undo-tree-mode)
;; diff-hl
(global-diff-hl-mode +1)
(add-hook 'dired-mode-hook 'diff-hl-dired-mode)
;; diminish various modes
;; (diminish 'hs-minor-mode)
;; (diminish 'subword-mode)

View File

@@ -17,14 +17,9 @@
(package-initialize)
(defvar siren-packages
'(browse-kill-ring
dash
diff-hl
'(dash
diminish
exec-path-from-shell
git-timemachine
gitconfig-mode
gitignore-mode
smart-mode-line
use-package)
"A list of default packages to ensure are installed at launch.")

View File

@@ -0,0 +1,14 @@
;;; siren-browse-kill-ring.el --- jimeh's Emacs Siren: browse-kill-ring configuration.
;;; Commentary:
;; Basic configuration for browse-kill-ring.
;;; Code:
(use-package browse-kill-ring
:init
(browse-kill-ring-default-keybindings))
(provide 'siren-browse-kill-ring)
;;; siren-browse-kill-ring.el ends here

View File

@@ -10,12 +10,11 @@
:mode "\\.coffee\\'"
:interpreter "coffee"
:init
(setq coffee-tab-width 2)
:config
(require 'siren-programming)
(setq coffee-tab-width 2)
(defun siren-coffee-mode-defaults ()
(siren-prog-mode-defaults)

15
modules/siren-diff-hl.el Normal file
View File

@@ -0,0 +1,15 @@
;;; siren-diff-hl.el --- jimeh's Emacs Siren: diff-hl configuration.
;;; Commentary:
;; Basic configuration for diff-hl.
;;; Code:
(use-package diff-hl
:init
(add-hook 'dired-mode-hook 'diff-hl-dired-mode)
(global-diff-hl-mode +1))
(provide 'siren-diff-hl)
;;; siren-diff-hl.el ends here

17
modules/siren-flyspell.el Normal file
View File

@@ -0,0 +1,17 @@
;;; siren-flyspell.el --- jimeh's Emacs Siren: flyspell configuration.
;;; Commentary:
;; Basic configuration for flyspell.
;;; Code:
(require 'flyspell)
(diminish 'flyspell-mode)
(setq ispell-program-name "aspell" ; use aspell instead of ispell
ispell-extra-args '("--sug-mode=ultra"))
(global-set-key (kbd "s-.") 'flyspell-correct-word-before-point)
(provide 'siren-flyspell)
;;; siren-flyspell.el ends here

View File

@@ -0,0 +1,15 @@
;;; siren-git-timemachine.el --- jimeh's Emacs Siren: git-timemachine configuration.
;;; Commentary:
;; Basic configuration for git-timemachine.
;;; Code:
(use-package git-timemachine
:defer t
:init
(defalias 'gt 'git-timemachine))
(provide 'siren-git-timemachine)
;;; siren-git-timemachine.el ends here

View File

@@ -0,0 +1,26 @@
;;; siren-gitconfig.el --- jimeh's Emacs Siren: gitconfig-mode configuration.
;;; Commentary:
;; Basic configuration for gitconfig-mode.
;;; Code:
(use-package gitconfig-mode
:mode "\\.gitconfig" "gitconfig\\'" "\\.git\\\/config"
:config
(require 'siren-programming)
(defun siren-gitconfig-mode-defaults ()
(siren-prog-mode-defaults)
(setq tab-width 2)
(highlight-indentation-current-column-mode)
(run-hooks 'siren-prog-mode-hook))
(setq siren-gitconfig-mode-hook 'siren-gitconfig-mode-defaults)
(add-hook 'gitconfig-mode-hook (lambda ()
(run-hooks 'siren-gitconfig-mode-hook))))
(provide 'siren-gitconfig)
;;; siren-gitconfig.el ends here

View File

@@ -0,0 +1,26 @@
;;; siren-gitignore.el --- jimeh's Emacs Siren: gitignore-mode configuration.
;;; Commentary:
;; Basic configuration for gitignore-mode.
;;; Code:
(use-package gitignore-mode
:mode "\\.gitignore" "gitignore\\'"
:config
(require 'siren-programming)
(defun siren-gitignore-mode-defaults ()
(siren-prog-mode-defaults)
(setq tab-width 2)
(highlight-indentation-current-column-mode)
(run-hooks 'siren-prog-mode-hook))
(setq siren-gitignore-mode-hook 'siren-gitignore-mode-defaults)
(add-hook 'gitignore-mode-hook (lambda ()
(run-hooks 'siren-gitignore-mode-hook))))
(provide 'siren-gitignore)
;;; siren-gitignore.el ends here

View File

@@ -9,7 +9,9 @@
;; Modules
(require 'siren-aliases)
(require 'siren-avy)
(require 'siren-browse-kill-ring)
(require 'siren-company)
(require 'siren-diff-hl)
(require 'siren-dired)
(require 'siren-direx)
(require 'siren-dumb-jump)
@@ -17,7 +19,9 @@
(require 'siren-editorconfig)
(require 'siren-evil)
(require 'siren-folding)
(require 'siren-flyspell)
(require 'siren-full-ack)
(require 'siren-git-timemachine)
(require 'siren-github)
(require 'siren-global-keybindings)
(require 'siren-goto-symbol)
@@ -67,6 +71,8 @@
(require 'siren-cucumber)
(require 'siren-dockerfile)
(require 'siren-emacs-lisp)
(require 'siren-gitconfig)
(require 'siren-gitignore)
(require 'siren-go)
(require 'siren-js)
(require 'siren-json)