Skip to content

Commit

Permalink
feat(emacs): Switch from homebrew package parser to emacs-overlay's
Browse files Browse the repository at this point in the history
  • Loading branch information
TLATER committed Feb 3, 2025
1 parent 3248982 commit 8375229
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 83 deletions.
24 changes: 24 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nixd.url = "github:nix-community/nixd";
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs";
};

deadnix.url = "github:astro/deadnix";
};
Expand Down
8 changes: 7 additions & 1 deletion home-config/dotfiles/emacs.d/config/editing.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
;; ----------------------------------------------------------------------------------

(leaf editorconfig
:ensure t
:hook (prog-mode-hook . editorconfig-mode))

;; ----------------------------------------------------------------------------------
;;; Clean up whitespace automatically
;; ----------------------------------------------------------------------------------

(leaf whitespace-cleanup-mode
:ensure t
:commands global-whitespace-cleanup-mode
:global-minor-mode global-whitespace-cleanup-mode)

Expand All @@ -55,7 +57,6 @@
;; ----------------------------------------------------------------------------------

(leaf files
:ensure nil
:custom (require-final-newline . "visit-save")
:custom (major-mode-remap-alist . '((sh-mode . bash-ts-mode)
(css-mode . css-ts-mode))))
Expand All @@ -65,6 +66,7 @@
;; ----------------------------------------------------------------------------------

(leaf yasnippet
:ensure t
:custom
`(yas-snippet-dirs . '(,(expand-file-name "snippets" share-dir)))
:global-minor-mode yas-global-mode
Expand Down Expand Up @@ -167,6 +169,7 @@
;; ----------------------------------------------------------------------------------

(leaf smartparens
:ensure t
:defun sp-use-smartparens-bindings
:bind (:smartparens-mode-map
("C-S-a" . sp-beginning-of-sexp)
Expand All @@ -186,6 +189,7 @@
;; ----------------------------------------------------------------------------------

(leaf separedit
:ensure t
:bind (:prog-mode-map
:package prog-mode
("C-c ;" . #'separedit))
Expand Down Expand Up @@ -213,6 +217,7 @@
(setq undo-outer-limit (* 50 1024 1024))

(leaf vundo
:ensure t
:bind
("C-x u" . vundo)
(:vundo-mode-map
Expand Down Expand Up @@ -240,6 +245,7 @@
(setq vundo-pre-enter-hook '(vundo-set-symbols-for-frame)))

(leaf undo-fu-session
:ensure t
:custom
`(undo-fu-session-directory . ,(expand-file-name "undo-fu-session" back-dir))
(undo-fu-session-compression . 'xz)
Expand Down
32 changes: 28 additions & 4 deletions home-config/dotfiles/emacs.d/config/features.el
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
;; ----------------------------------------------------------------------------------

(leaf vterm
:ensure t
:hook (vterm-mode-hook . (lambda ()
(set (make-local-variable 'global-hl-line-mode) nil)))
:bind (:vterm-mode-map
Expand All @@ -55,6 +56,7 @@
;; ----------------------------------------------------------------------------------

(leaf dashboard
:ensure t
:custom
(dashboard-set-init-info . t)
(dashboard-set-footer . nil)
Expand All @@ -76,19 +78,24 @@
;; ----------------------------------------------------------------------------------

(leaf magit
:ensure t
:bind
("C-c g s" . magit-status)
(:project-prefix-map
("m" . magit-project-status)))
(leaf transient
:ensure t
:custom
`(transient-levels-file . ,(expand-file-name "transient/levels.el" data-dir))
`(transient-values-file . ,(expand-file-name "transient/values.el" data-dir))
`(transient-history-file . ,(expand-file-name "transient/history.el" data-dir)))
(leaf magit-lfs
:ensure t
:after magit)
(leaf sqlite3) ; Required for forge
(leaf sqlite3
:ensure t) ; Required for forge
(leaf forge
:ensure t
:after (magit sqlite3)
:custom
`(forge-database-file . ,(expand-file-name "forge-database.sqlite" data-dir))
Expand All @@ -103,6 +110,7 @@
;; ----------------------------------------------------------------------------------

(leaf which-key
:ensure t
:custom
(which-key-idle-delay . 0.5)
(which-key-popup-type . 'minibuffer)
Expand All @@ -121,6 +129,7 @@
;; ----------------------------------------------------------------------------------

(leaf vertico
:ensure t
:custom
(vertico-count . 15)
:global-minor-mode vertico-mode)
Expand All @@ -129,7 +138,6 @@
;; differently - this is what makes M-s r g show up in a separate
;; buffer, for example.
(leaf vertico-multiform
:ensure nil
:after vertico
:custom
(vertico-multiform-commands . '((consult-imenu buffer)
Expand All @@ -145,15 +153,18 @@
:global-minor-mode savehist-mode)

(leaf orderless
:ensure t
:custom
(completion-styles . '(orderless basic))
(completion-category-defaults . nil)
(completion-category-overrides . '((file (styles basic partial-completion)))))

(leaf marginalia
:ensure t
:global-minor-mode marginalia-mode )

(leaf embark
:ensure t
:defun embark--truncate-target
:bind (("C-." . embark-act)
("M-." . embark-dwim)
Expand Down Expand Up @@ -208,6 +219,7 @@
:advice (:around embark-completing-read-prompter #'embark-hide-which-key-indicator))

(leaf embark-consult
:ensure t
:hook (embark-collect-mode . consult-preview-at-point-mode))

(leaf emacs
Expand Down Expand Up @@ -240,6 +252,7 @@

;; TODO(tlater): Figure out how to preinstall docsets
(leaf devdocs
:ensure t
:bind ("C-h D" . devdocs-lookup)
:custom
`(devdocs-data-dir . ,(expand-file-name "docsets" data-dir)))
Expand All @@ -249,6 +262,7 @@
;; ----------------------------------------------------------------------------------

(leaf cov
:ensure t
:hook (prog-mode-hook . cov-mode)
:custom
(cov-lcov-patterns . '((lambda (dir name)
Expand Down Expand Up @@ -295,6 +309,7 @@
;; ----------------------------------------------------------------------------------

(leaf smart-mode-line
:ensure t
:defun (sml/setup sml/faces-from-theme sml/theme-p)
:custom
(sml/no-confirm-load-theme . t)
Expand All @@ -306,6 +321,7 @@
;; ----------------------------------------------------------------------------------

(leaf diff-hl
:ensure t
:demand
:commands diff-hl-flydiff-mode global-diff-hl-mode
:custom-face
Expand All @@ -330,7 +346,6 @@
;; ----------------------------------------------------------------------------------

(leaf dired
:ensure nil
:commands dired
:bind (("C-x d" . dired)
(:dired-mode-map
Expand All @@ -343,9 +358,11 @@
(put 'dired-find-alternate-file 'disabled nil))

(leaf dired-hacks-utils
:ensure t
:after dired
:hook (dired-mode-hook . dired-utils-format-information-line-mode))
(leaf dired-filter
:ensure t
:after dired
:hook (dired-mode-hook . dired-filter-mode)
:custom
Expand All @@ -354,6 +371,7 @@
(:dired-mode-map
("C-c f" . dired-filter-map)))
(leaf dired-subtree
:ensure t
:after dired
:bind (:dired-mode-map
:package dired
Expand All @@ -363,11 +381,13 @@
("C-<up>" . dired-subtree-previous-sibling)
("C-<down>" . dired-subtree-next-sibling)))
(leaf dired-narrow
:ensure t
:after dired
:bind (:dired-mode-map
:package dired
("C-s" . dired-narrow)))
(leaf dired-collapse
:ensure t
:after dired
:hook (dired-mode-hook . dired-collapse-mode))

Expand All @@ -388,8 +408,10 @@
;;
;; REST browsing
;;
(leaf restclient)
(leaf restclient
:ensure t)
(leaf restclient-jq
:ensure t
:after restclient)

;; ----------------------------------------------------------------------------------
Expand All @@ -398,6 +420,7 @@

;; Ensure proper ANSI code handling
(leaf xterm-color
:ensure t
:after compile
:defun xterm-color-filter compilation-filter compilation-filter@advice-compilation-filter
:custom
Expand All @@ -406,6 +429,7 @@
(funcall orig proc (xterm-color-filter string)))))

(leaf alert
:ensure t
:commands alert
:custom
(alert-default-style . 'libnotify))
Expand Down
1 change: 1 addition & 0 deletions home-config/dotfiles/emacs.d/config/integration.el
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
(browse-url-browser-function . 'browse-url-default-browser))

(leaf direnv
:ensure t
:global-minor-mode direnv-mode)

;; ----------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 8375229

Please sign in to comment.