diff --git a/init.el b/init.el index 9b54be0..8361f41 100644 --- a/init.el +++ b/init.el @@ -42,3 +42,22 @@ (load-user-file "interface.el") (load-user-file "key-bindings.el") (load-user-file "typography.el") + +(load-user-dir "pkg") + + +;; WARNING: Don't touch anything after this comment! + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + '(yasnippet which-key super-save solaire-mode smartparens rainbow-delimiters magit hl-todo git-gutter flycheck diminish crux))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/pkg/crux.el b/pkg/crux.el new file mode 100644 index 0000000..d5e432e --- /dev/null +++ b/pkg/crux.el @@ -0,0 +1,12 @@ +;; Useful improvements to default keyboard shortcuts. +;; https://github.com/bbatsov/crux +(use-package crux + :ensure t + :bind + ("C-a" . crux-move-beginning-of-line) + ("C-k" . crux-smart-kill-line) + ("C-c d" . crux-duplicate-current-line-or-region) + ("C-c f" . crux-recentf-find-file) + ("C-c n" . crux-cleanup-buffer-or-region) + ("C-x C-l" . crux-downcase-region) + ("C-x C-u" . crux-upcase-region)) diff --git a/pkg/diminish.el b/pkg/diminish.el new file mode 100644 index 0000000..0bb2d38 --- /dev/null +++ b/pkg/diminish.el @@ -0,0 +1,4 @@ +;; Don't display minor modes in the mode line. +;; https://github.com/emacsmirror/diminish +(use-package diminish + :ensure t) diff --git a/pkg/flycheck.el b/pkg/flycheck.el new file mode 100644 index 0000000..09a67ae --- /dev/null +++ b/pkg/flycheck.el @@ -0,0 +1,9 @@ +;; On-the-fly syntax checking. +;; https://github.com/flycheck/flycheck +(use-package flycheck + :ensure t + :defer t + :diminish flycheck-mode + :config + (setq flycheck-standard-error-navigation nil) + (add-hook 'after-init-hook #'global-flycheck-mode)) diff --git a/pkg/git-gutter.el b/pkg/git-gutter.el new file mode 100644 index 0000000..b9e64ea --- /dev/null +++ b/pkg/git-gutter.el @@ -0,0 +1,12 @@ +;; Display gutter icons for inserted, modified, and deleted lines. +;; https://github.com/emacsorphanage/git-gutter +(use-package git-gutter + :ensure t + :diminish git-gutter-mode + :config + (custom-set-variables + '(git-gutter:modified-sign " *") + '(git-gutter:added-sign " +") + '(git-gutter:deleted-sign " -")) + (add-hook 'prog-mode-hook #'git-gutter-mode) + (add-hook 'text-mode-hook #'git-gutter-mode)) diff --git a/pkg/hl-line.el b/pkg/hl-line.el new file mode 100644 index 0000000..39a34ef --- /dev/null +++ b/pkg/hl-line.el @@ -0,0 +1,6 @@ +;; Highlight the current line. +;; https://www.emacswiki.org/emacs/HighlightCurrentLine +(use-package hl-line + :config + (add-hook 'prog-mode-hook #'hl-line-mode) + (add-hook 'text-mode-hook #'hl-line-mode)) diff --git a/pkg/hl-todo.el b/pkg/hl-todo.el new file mode 100644 index 0000000..7d944ca --- /dev/null +++ b/pkg/hl-todo.el @@ -0,0 +1,7 @@ +;; Highlight keywords in comments and strings. +;; https://github.com/tarsius/hl-todo +(use-package hl-todo + :ensure t + :config + (add-hook 'prog-mode-hook #'hl-todo-mode) + (add-hook 'text-mode-hook #'hl-todo-mode)) diff --git a/pkg/magit.el b/pkg/magit.el new file mode 100644 index 0000000..7046786 --- /dev/null +++ b/pkg/magit.el @@ -0,0 +1,5 @@ +;; Git integration, how it was meant to be. +;; https://github.com/magit/magit +(use-package magit + :ensure t + :defer t) diff --git a/pkg/rainbow-delimiters.el b/pkg/rainbow-delimiters.el new file mode 100644 index 0000000..9d7f538 --- /dev/null +++ b/pkg/rainbow-delimiters.el @@ -0,0 +1,6 @@ +;; Rainbow delimiters! +;; https://github.com/Fanael/rainbow-delimiters +(use-package rainbow-delimiters + :ensure t + :config + (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)) diff --git a/pkg/smart-parens.el b/pkg/smart-parens.el new file mode 100644 index 0000000..d7065a7 --- /dev/null +++ b/pkg/smart-parens.el @@ -0,0 +1,11 @@ +;; Insert/delete parens in pairs, highlight pairs, etc. General quality of life +;; improvements. +;; https://github.com/Fuco1/smartparens +(use-package smartparens + :ensure t + :diminish smartparens-mode + :config + (progn + (require 'smartparens-config) + (smartparens-global-mode) + (show-paren-mode))) diff --git a/pkg/solaire-mode.el b/pkg/solaire-mode.el new file mode 100644 index 0000000..64e4083 --- /dev/null +++ b/pkg/solaire-mode.el @@ -0,0 +1,6 @@ +;; Distinguish "real" buffers from "unreal" buffers. +;; https://github.com/hlissner/emacs-solaire-mode +(use-package solaire-mode + :ensure t + :config + (solaire-global-mode +1)) diff --git a/pkg/super-save.el b/pkg/super-save.el new file mode 100644 index 0000000..29508f2 --- /dev/null +++ b/pkg/super-save.el @@ -0,0 +1,8 @@ +;; Save buffers when focus is lost. +;; https://github.com/bbatsov/super-save +(use-package super-save + :ensure t + :defer t + :diminish super-save-mode + :config + (super-save-mode +1)) diff --git a/pkg/which-key.el b/pkg/which-key.el new file mode 100644 index 0000000..8cad2b3 --- /dev/null +++ b/pkg/which-key.el @@ -0,0 +1,7 @@ +;; Show keystroke suggestions. +;; https://github.com/justbur/emacs-which-key +(use-package which-key + :ensure t + :diminish which-key-mode + :config + (which-key-mode)) diff --git a/pkg/yasnippet.el b/pkg/yasnippet.el new file mode 100644 index 0000000..6a5625f --- /dev/null +++ b/pkg/yasnippet.el @@ -0,0 +1,9 @@ +;; A template system for Emacs. +;; https://github.com/joaotavora/yasnippet +(use-package yasnippet + :ensure t + :defer t + :config + (yas-reload-all) + (add-hook 'prog-mode-hook 'yas-minor-mode) + (add-hook 'text-mode-hook 'yas-minor-mode))