Skip to content

Commit

Permalink
Refactor/fix some recipes
Browse files Browse the repository at this point in the history
- Add diminish and load it before proceeding to loading other
packages.
- Make subword mode into a recipe
  • Loading branch information
regob committed Oct 8, 2024
1 parent bd14fa8 commit b3415a1
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 6 deletions.
11 changes: 11 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@
(add-hook 'elpaca-post-queue-hook #'(lambda () (message "Elpaca post queue hook running ...")))
(advice-add 'elpaca-after-init-hook :after #'(lambda (&rest r) (message "Elpaca after-init-hook finished!")) )

;; ====================================
;; Packages required for use-package
;; ====================================

(use-package diminish
:ensure (:source "MELPA"))

(elpaca-wait)

;; ====================================
;; General setup
;; ====================================
Expand Down Expand Up @@ -183,6 +192,8 @@
(require 'init-minibuffer nil nil)
(require 'init-utils nil nil)

(elpaca-wait)

;; ----------------------------------------------------------------------------
;; Load private libraries
;; ----------------------------------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions lisp/init-appearance.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
(display-line-numbers-mode -1)))
(global-set-key [remap goto-line] 'rb-goto-line-with-feedback)

;; ----------------------------------------------------------------------------
;; Small utilities for changing modeline/fringe/etc
;; ----------------------------------------------------------------------------


(use-package anzu
:ensure (:host github :repo "emacsorphanage/anzu")
:config
Expand Down
1 change: 1 addition & 0 deletions lisp/init-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@


(use-package yasnippet
:diminish yas-minor-mode
:config
(yas-global-mode 1)
(add-to-list 'hippie-expand-try-functions-list 'yas-hippie-try-expand)
Expand Down
16 changes: 11 additions & 5 deletions lisp/init-editing-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)

;; modes for navigating super_words and CamelCase words
(setq global-superword-mode t)
;; (setq global-subword-mode t)
;; mode for navigating super_words
(use-package subword
:ensure nil
:diminish superword-mode
:config
(customize-set-variable 'global-superword-mode t)
)


;; visual line mode enabled, without word wrapping
(setq visual-line-mode t)
(setq word-wrap nil)


;;; Some settings taken from better-defaults

;; zap-up-to-char instead of zap-to-char
Expand All @@ -33,7 +37,7 @@
)

(electric-pair-mode -1)
(electric-indent-mode -1) ; TODO: still gets turned on in cc-mode
(electric-indent-mode -1)

(use-package multiple-cursors
:defer nil
Expand Down Expand Up @@ -76,6 +80,7 @@


(use-package aggressive-indent
:diminish
:hook
((css-mode . aggressive-indent-mode))
((emacs-lisp-mode . aggressive-indent-mode))
Expand All @@ -93,6 +98,7 @@
;; ----------------------------------------------------------------------------

(use-package undo-tree
:diminish undo-tree-mode
:ensure (:source "MELPA")
:config
(global-undo-tree-mode)
Expand Down
2 changes: 2 additions & 0 deletions lisp/init-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

;; Show transient key suggestions when typing a key chord
(use-package which-key
:diminish which-key-mode
:ensure t
:config
(which-key-mode))
Expand All @@ -22,6 +23,7 @@
)

(use-package eldoc
:diminish
:ensure nil
:config
(setq eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly))
Expand Down
6 changes: 5 additions & 1 deletion lisp/init-markup.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
;;; Code:

(use-package yaml-mode
:ensure (:source "MELPA")
:init
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml\\'" . yaml-mode))
)

(use-package markdown-mode
:ensure (:source "MELPA")
:config
(setq markdown-command "pandoc")
:custom-face
(markdown-code-face ((t (:inherit org-code))))
)
(use-package csv-mode)
(use-package csv-mode
:ensure (:source "ELPA")
)

(provide 'init-markup)

Expand Down
1 change: 1 addition & 0 deletions lisp/init-smartparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
;;; Code:

(use-package smartparens
:diminish
:hook
((css-mode . smartparens-mode)
(prog-mode . smartparens-mode)
Expand Down

0 comments on commit b3415a1

Please sign in to comment.