This commit is contained in:
Daniel Ziltener 2023-12-14 12:30:17 +01:00
parent afb348f363
commit 79ec038dc9
Signed by: zilti
GPG key ID: B38976E82C9DAE42
2 changed files with 108 additions and 112 deletions

View file

@ -2,7 +2,7 @@
{ {
home.file.".emacs.d/early-init.el" = { home.file.".emacs.d/early-init.el" = {
enable = false; enable = true;
text = "(setq package-enable-at-startup nil)"; text = "(setq package-enable-at-startup nil)";
}; };
home.file.".emacs.d/init.el" = { home.file.".emacs.d/init.el" = {
@ -29,73 +29,5 @@
enable = true; enable = true;
package = pkgs.emacs29-gtk3; package = pkgs.emacs29-gtk3;
extraConfig = builtins.readFile ./init.el; extraConfig = builtins.readFile ./init.el;
extraPackages = epkgs: with epkgs; [
airline-themes
all-the-icons
cape
catppuccin-theme
cider
circe
clojure-ts-mode
code-review
color-theme-modern
consult
consult-eglot
consult-notes
corfu
corfu-terminal
delight
dhall-mode
editorconfig
eglot
el-patch
embark
embark-consult
evil
evil-cleverparens
evil-collection
evil-easymotion
evil-snipe
forge
geiser
geiser-chicken
geiser-guile
git-gutter
goto-chg
guix
keychain-environment
lsp-scheme
magit
magit-todos
marginalia
moe-theme
nerd-icons-completion
nerd-icons-corfu
nix-mode
nix-ts-mode
orderless
org
org-modern
org-rainbow-tags
org-roam
org-roam-ui
package-lint
pass
password-store
password-store-otp
plan9-theme
powerline
rainbow-delimiters
smartparens
tempel
tree-sitter
tree-sitter-langs
vertico
websocket
wgrep
which-key
xref-union
zig-mode
];
}; };
} }

View file

@ -43,19 +43,67 @@
;;;; Straight.el ;;;; Straight.el
(defvar bootstrap-version) ;; (defvar bootstrap-version)
(let ((bootstrap-file ;; (let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) ;; (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6)) ;; (bootstrap-version 6))
(unless (file-exists-p bootstrap-file) ;; (unless (file-exists-p bootstrap-file)
(with-current-buffer ;; (with-current-buffer
(url-retrieve-synchronously ;; (url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" ;; "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies) ;; 'silent 'inhibit-cookies)
(goto-char (point-max)) ;; (goto-char (point-max))
(eval-print-last-sexp))) ;; (eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage)) ;; (load bootstrap-file nil 'nomessage))
(setq straight-use-package-by-default t) ;; (setq straight-use-package-by-default t)
;;;; Elpaca
;;;;; Installation
(defvar elpaca-installer-version 0.6)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (call-process "git" nil buffer t "clone"
(plist-get order :repo) repo)))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
;;;;; use-package integration
(elpaca elpaca-use-package
(elpaca-use-package-mode)
(setq elpaca-use-package-by-default t))
(elpaca-wait)
;;;; Package Management Configuration ;;;; Package Management Configuration
;; See: https://github.com/radian-software/el-patch ;; See: https://github.com/radian-software/el-patch
@ -80,6 +128,7 @@
;;;; Emacs ;;;; Emacs
(use-package emacs (use-package emacs
:elpaca nil
:delight (eldoc-mode " 󰙎") :delight (eldoc-mode " 󰙎")
:custom :custom
(completion-cycle-threshold 10) (completion-cycle-threshold 10)
@ -204,7 +253,8 @@
(add-to-list 'default-frame-alist '(alpha-background . 80)) (add-to-list 'default-frame-alist '(alpha-background . 80))
(use-package lambda-line (use-package lambda-line
:straight (:type git :host github :repo "lambda-emacs/lambda-line") ;;:straight (:type git :host github :repo "lambda-emacs/lambda-line")
:elpaca (:host github :repo "lambda-emacs/lambda-line")
:custom :custom
(lambda-line-icon-time t) ;; requires ClockFace font (see below) (lambda-line-icon-time t) ;; requires ClockFace font (see below)
(lambda-line-clockface-update-fontset "ClockFaceRect") ;; set clock icon (lambda-line-clockface-update-fontset "ClockFaceRect") ;; set clock icon
@ -240,7 +290,8 @@
(setq mode-line-format (list "%_")))) (setq mode-line-format (list "%_"))))
(use-package lambda-themes (use-package lambda-themes
:straight (:type git :host github :repo "lambda-emacs/lambda-themes") ;;:straight (:type git :host github :repo "lambda-emacs/lambda-themes")
:elpaca (:host github :repo "lambda-emacs/lambda-themes")
:custom :custom
(lambda-themes-set-italic-comments t) (lambda-themes-set-italic-comments t)
(lambda-themes-set-italic-keywords t) (lambda-themes-set-italic-keywords t)
@ -301,6 +352,7 @@
;;;; Search, Completion, Execution ;;;; Search, Completion, Execution
;;;;; Preliminary Packages ;;;;; Preliminary Packages
(use-package savehist (use-package savehist
:elpaca nil
:init :init
(savehist-mode)) (savehist-mode))
@ -314,11 +366,11 @@
completion-category-overrides '((file (styles basic partial-completion))))) completion-category-overrides '((file (styles basic partial-completion)))))
(use-package embark-consult (use-package embark-consult
:after (embark consult)
:hook :hook
(embark-collect-mode . consult-preview-at-point-mode)) (embark-collect-mode . consult-preview-at-point-mode))
(use-package consult (use-package consult
:elpaca nil ;; Because otherwise, consult and embark-consult block each other
:config :config
(require 'consult-flymake) (require 'consult-flymake)
(require 'consult-xref) (require 'consult-xref)
@ -499,6 +551,15 @@ Point must be at the beginning of balanced expression (sexp)."
(looking-back (rx (or ")" "}" "]")))) (looking-back (rx (or ")" "}" "]"))))
;;;;; Basic ;;;;; Basic
(use-package symex
:custom
(symex-modal-backend 'evil)
:config
(symex-initialize)
:bind
(:map evil-insert-state-map
("C-s" . #'symex-mode-interface)))
(use-package paredit (use-package paredit
:hook :hook
clojure-mode clojure-mode
@ -648,33 +709,33 @@ Point must be at the beginning of balanced expression (sexp)."
:ensure t) :ensure t)
;;;;; Clojure ;;;;; Clojure
;; (use-package clojure-ts-mode (use-package clojure-ts-mode
;; :delight "" :delight ""
;; :after tree-sitter :after tree-sitter
;; :config :config
;; (require 'sesman) (require 'sesman)
;; (sesman-install-menu clojure-mode-map) (sesman-install-menu clojure-mode-map)
;; :hook :hook
;; ((clojure-ts-mode . eglot-ensure) ((clojure-ts-mode . eglot-ensure)
;; (clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
;; (setq-local sesman-system 'CIDER))) (setq-local sesman-system 'CIDER)))
;; (clojure-ts-mode . (lambda () (clojure-ts-mode . (lambda ()
;; (sesman-install-menu clojure-mode-map))) (sesman-install-menu clojure-mode-map)))
;; (clojurec-ts-mode . (lambda () (clojurec-ts-mode . (lambda ()
;; (sesman-install-menu clojurec-mode-map))) (sesman-install-menu clojurec-mode-map)))
;; (clojurescript-ts-mode . (lambda () (clojurescript-ts-mode . (lambda ()
;; (sesman-install-menu clojurescript-mode-map)))) (sesman-install-menu clojurescript-mode-map))))
;; :mode :mode
;; ("\\.clj\\'" . #'clojure-ts-mode) ("\\.clj\\'" . #'clojure-ts-mode)
;; ("\\.cljc\\'" . #'clojurec-ts-mode) ("\\.cljc\\'" . #'clojurec-ts-mode)
;; ("\\.cljs\\'" . #'clojurescript-ts-mode) ("\\.cljs\\'" . #'clojurescript-ts-mode)
;; :init :init
;; (add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
;; '(clojure-ts-mode . clojure)) '(clojure-ts-mode . clojure))
;; (add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
;; '(clojurec-ts-mode . clojure)) '(clojurec-ts-mode . clojure))
;; (add-to-list 'tree-sitter-major-mode-language-alist (add-to-list 'tree-sitter-major-mode-language-alist
;; '(clojurescript-ts-mode . clojure))) '(clojurescript-ts-mode . clojure)))
(use-package cider (use-package cider
:delight (cider-mode '(:eval (concat "  [" (cider--modeline-info) "]"))) :delight (cider-mode '(:eval (concat "  [" (cider--modeline-info) "]")))
@ -716,6 +777,7 @@ Point must be at the beginning of balanced expression (sexp)."
;;;;;; Chicken Scheme ;;;;;; Chicken Scheme
(use-package scheme (use-package scheme
:elpaca nil
:config :config
(setq prettify-symbols-alist (setq prettify-symbols-alist
'(("lambda" . "λ"))) '(("lambda" . "λ")))
@ -801,7 +863,9 @@ Point must be at the beginning of balanced expression (sexp)."
;;;; Communication ;;;; Communication
;;;;; IRC ;;;;; IRC
(use-package rcirc (use-package rcirc
:elpaca nil
:ensure t :ensure t
:after password-store
:custom :custom
(rcirc-server-alist (rcirc-server-alist
`(("liberachat.irc.lyrion.ch" `(("liberachat.irc.lyrion.ch"