summaryrefslogtreecommitdiff
path: root/.config/emacs/init.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-11-06 17:25:59 +0200
committerThanos Apollo <[email protected]>2024-11-06 17:25:59 +0200
commit95798652cbdef5889d4ef75162804554f60cb057 (patch)
tree9986f0ab76893219d9e9fb2beb4ec0676b83cf1d /.config/emacs/init.el
parent25d977f3cbf9469de70fcf15797549200be0cda7 (diff)
emacs: Rewrite without straight
* Install packages using use-package :vc instead, available at emacs-30
Diffstat (limited to '.config/emacs/init.el')
-rw-r--r--.config/emacs/init.el168
1 files changed, 42 insertions, 126 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 35331ae..a4a92cd 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -29,8 +29,6 @@
;;; Code:
;; Disable package.el
-(setq package-enable-at-startup nil
- package-archives nil)
(setf user-full-name "Thanos Apollo"
user-mail-address "[email protected]")
@@ -73,31 +71,6 @@
;; Enable use-package support for imenu
(setf use-package-enable-imenu-support t)
-;; Install straight.el
-(defvar bootstrap-version)
-
-(let ((bootstrap-file
- (expand-file-name
- "straight/repos/straight.el/bootstrap.el"
- (or (bound-and-true-p straight-base-dir)
- user-emacs-directory)))
- (bootstrap-version 7))
- (unless (file-exists-p bootstrap-file)
- (with-current-buffer
- (url-retrieve-synchronously
- "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
- 'silent 'inhibit-cookies)
- (goto-char (point-max))
- (eval-print-last-sexp)))
- (load bootstrap-file nil 'nomessage))
-
-(require 'straight)
-
-(setf straight-use-package-by-default t)
-
-(setf straight-recipe-overrides
- '((transmission :type git :host nil :repo "[email protected]:/var/git/transmission.git")))
-
(setf browse-url-browser-function 'browse-url-generic
browse-url-generic-program "icecat"
backup-directory-alist '((".*" . "~/.Trash"))
@@ -220,7 +193,6 @@
(scheme-mode . thanos/add-custom-keywords)))
(use-package dired
- :straight nil
:ensure nil
:config
(defun dired-watch-video ()
@@ -342,7 +314,8 @@
(make-directory "~/Notes"))
(use-package org-roam
- :straight (org-roam :local-repo "~/Dev/emacs-lisp/org-roam")
+ :vc t
+ :load-path "~/Dev/emacs-lisp/org-roam"
:defer t
:init
(define-prefix-command 'thanos/notes-map)
@@ -423,7 +396,7 @@
(unless (or is-phone is-uranus)
(use-package modus-themes
- :straight t
+ :vc (:url "https://github.com/protesilaos/modus-themes")
:config
(setf modus-themes-italic-constructs nil
modus-themes-bold-constructs nil
@@ -590,22 +563,12 @@ rss.xml" anna piracy)
:hook ((elfeed-searchacw-mode . (lambda () (display-line-numbers-mode 0)))))
;; Python
-(use-package python-mode
- :defer t
- :config
- (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)))
-
-(use-package pyenv
- :defer t)
-
-;; Clojure
-(use-package cider
- :defer t)
+(add-to-list 'auto-mode-alist '("\\.py\\'" . python-ts-mode))
-(use-package clojure-mode
- :defer t)
+;; Lisp
(use-package rainbow-delimiters
+ :vc (:url "https://github.com/Fanael/rainbow-delimiters")
:defer t
:hook ((emacs-lisp-mode . rainbow-delimiters-mode)
(lisp-mode . rainbow-delimiters-mode)
@@ -614,48 +577,7 @@ rss.xml" anna piracy)
(use-package sly
:init (setf inferior-lisp-program "sbcl")
- :defer t)
-
-(use-package helpful
- :defer t
- :bind (("C-h f" . 'helpful-callable)
- ("C-h v" . 'helpful-variable)
- ("C-h k" . 'helpful-key)
- ("C-h x" . 'helpful-command)
- ("C-h ." . 'helpful-at-point)
- ("C-h F" . 'helpful-function)
- ("C-h C-k" . 'helpful-kill-buffers)
- ("C-h a" . 'apropos)
- ("C-h C-m" . 'info-apropos)))
-
-(use-package ox-hugo
- :ensure t
- :config
- (setf org-hugo-section "post"))
-
-(use-package json-mode
- :defer t
- :config
- (add-to-list 'auto-mode-alist '("\\.json'" . json-mode)))
-
-(defun project-magit ()
- "Run magit-status in the current project's root."
- (interactive)
- (magit-status-setup-buffer (project-root (project-current t))))
-
-(use-package magit
- :defer t
- :config
- (setf magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
- :bind (:map project-prefix-map ("g" . 'project-magit)))
-
-(use-package magit-todos
- :after magit
- :config
- (magit-todos-mode 0)
- (setf magit-todos-keywords
- '(("TODO" . "#cc9393")
- ("FIXME" . "#FF0000"))))
+ :ensure t)
(use-package vc
:ensure t
@@ -750,7 +672,11 @@ rss.xml" anna piracy)
"Format patches for NUM of last commits"
(interactive (list (read-number "Number of commits: ")))
(vc-git-command nil 0 nil "format-patch" (format "-%d" num))
- (message "Done.")))
+ (message "Done."))
+ :bind
+ (:map vc-dir-mode-map
+ ("w" . vc-diff)
+ ("W" . vc-root-diff)))
(use-package corfu
:ensure t
@@ -799,7 +725,6 @@ rss.xml" anna piracy)
completion-cycle-threshold 2))
(use-package pdf-tools
- :straight nil
:ensure nil
:config
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode))
@@ -810,22 +735,13 @@ rss.xml" anna piracy)
;; minor modes automatically
(pdf-tools-enable-minor-modes)))))
-(use-package markdown-mode
- :straight nil
- :defer t
- :config
- (setq markdown-header-scaling t
- markdown-command "multimarkdown")
- (add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))
- :hook ((markdown-mode . flyspell-mode)))
-
(use-package nov
- :straight nil
- :defer t
+ :ensure nil
:config
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
(use-package eshell-syntax-highlighting
+ :vc (:url "https://github.com/akreisher/eshell-syntax-highlighting")
:ensure t
:after eshell
:config
@@ -837,8 +753,8 @@ rss.xml" anna piracy)
:commands emojify-mode)
(use-package flycheck-package
- :straight t
- :ensure t
+ :vc (:url "https://github.com/purcell/flycheck-package")
+ :ensure nil
:after flycheck)
(use-package flycheck
@@ -849,14 +765,6 @@ rss.xml" anna piracy)
:hook ((emacs-lisp-mode . (lambda () (flycheck-mode) (flycheck-package-setup)))))
(use-package eat
- :straight '(eat :type git
- :host codeberg
- :repo "akib/emacs-eat"
- :files ("*.el" ("term" "term/*.el") "*.texi"
- "*.ti" ("terminfo/e" "terminfo/e/*")
- ("terminfo/65" "terminfo/65/*")
- ("integration" "integration/*")
- (:exclude ".dir-locals.el" "*-tests.el")))
:config
(setf eshell-visual-commands nil
eat-term-name "xterm-256color")
@@ -903,7 +811,7 @@ rss.xml" anna piracy)
(display-line-numbers-mode -1)))))
(use-package eshell-git-prompt
- :straight nil
+ :ensure t
:config
(defun eshell-git-prompt-multiline ()
"Eshell Git prompt inspired by spaceship-prompt."
@@ -938,7 +846,8 @@ rss.xml" anna piracy)
;; Chat
(use-package jabber
- :defer t
+ :vc (:url "https://codeberg.org/emacs-jabber/emacs-jabber")
+ :ensure t
:config
(defun jabber-buffers-formats (&optional buffer-formats)
"Return jabber BUFFER-FORMATS without the format specifiers.
@@ -997,10 +906,12 @@ By default, returns all jabber related buffers format."
("C-c RET" . 'erc-cmd-QUERY)))
(use-package transmission
+ :vc (:url "https://github.com/holomorph/transmission")
:defer t)
(use-package sudo-edit
- :defer t
+ :vc (:url "https://github.com/nflath/sudo-edit")
+ :ensure t
:config
(setf sudo-edit-local-method "sudo"))
@@ -1019,7 +930,8 @@ By default, returns all jabber related buffers format."
(when (or is-zeus is-hermes)
(use-package yeetube
:init (define-prefix-command 'thanos/yeetube-map)
- :straight (yeeutube :local-repo "~/Dev/emacs-lisp/yeetube")
+ :vc t
+ :load-path "~/Dev/emacs-lisp/yeetube"
:ensure t
:config
(setf yeetube-results-limit 20
@@ -1038,7 +950,8 @@ By default, returns all jabber related buffers format."
(while (not (string= url "q"))
(setf url (read-string "Enter URL (q to quit): "))
(unless (string= url "q")
- (setf name (read-string (format "Custom name (download counter: %d) " download-counter)))
+ (setf name
+ (read-string (format "Custom name (download counter: %d) " download-counter)))
(push (cons url name) stored-contents)
(setf download-counter (1+ download-counter))))
;; Process the collected links and names
@@ -1059,7 +972,8 @@ By default, returns all jabber related buffers format."
(while (not (string= url "q"))
(setf url (read-string "Enter URL (q to quit): "))
(unless (string= url "q")
- (setf name (read-string (format "Custom name (download counter: %d) " download-counter)))
+ (setf name
+ (read-string (format "Custom name (download counter: %d) " download-counter)))
(setf download-counter (1+ download-counter))
(call-process-shell-command
(format
@@ -1080,7 +994,8 @@ By default, returns all jabber related buffers format."
("k" . 'yeetube-remove-saved-video)))
(use-package gnosis
- :straight (gnosis :local-repo "~/Dev/emacs-lisp/gnosis")
+ :vc t
+ :load-path "~/Dev/emacs-lisp/gnosis"
:ensure t
:init (define-prefix-command 'thanos/gnosis-map)
:config
@@ -1099,7 +1014,8 @@ By default, returns all jabber related buffers format."
(gnosis-vc-pull)
(use-package pcmpl-tailscale
- :straight (pcmpl-tailscale :local-repo "~/Dev/emacs-lisp/pcmpl-tailscale")
+ :vc t
+ :load-path "~/Dev/emacs-lisp/pcmpl-tailscale"
:ensure nil))
;; Emacs dev
@@ -1109,7 +1025,7 @@ By default, returns all jabber related buffers format."
;; AI tools
(use-package gptel
- :defer t
+ :ensure t
:config
(setf gptel-api-key (password-store-get-field "openai/[email protected]" "api")
gptel-default-mode 'org-mode
@@ -1180,7 +1096,6 @@ By default, returns all jabber related buffers format."
(kill-buffer (process-buffer process))))))))
(use-package notmuch
- :straight nil
:ensure t
:bind (("C-x m" . notmuch-hello)
:map notmuch-hello-mode-map
@@ -1193,7 +1108,9 @@ By default, returns all jabber related buffers format."
(setf notmuch-archive-tags '("-inbox" "-unread" "+archived")
notmuch-show-all-tags-list t
- notmuch-hello-sections '(notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-alltags))
+ notmuch-hello-sections
+ '(notmuch-hello-insert-header notmuch-hello-insert-saved-searches
+ notmuch-hello-insert-alltags))
(setq notmuch-search-oldest-first nil)
@@ -1227,13 +1144,12 @@ By default, returns all jabber related buffers format."
;; autosign messages
(add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
-(use-package yasnippet
- :ensure nil
- :config
- (when is-zeus (add-to-list 'yas-snippet-dirs "~/Dev/guile/guix/etc/snippets/yas")))
+;; (use-package yasnippet
+;; :ensure nil
+;; :config
+;; (when is-zeus (add-to-list 'yas-snippet-dirs "~/Dev/guile/guix/etc/snippets/yas")))
(use-package emms
- :straight nil
:defer t
:init (define-prefix-command 'thanos/emms)
:config
@@ -1307,7 +1223,6 @@ By default, returns all jabber related buffers format."
memory cores image (if iso (concat "-cdrom " iso) "")))))
(use-package 0x0
- :straight nil
:ensure nil)
;; Misc Functions ;;
@@ -1500,7 +1415,8 @@ Create a temporary frame to execute BODY, which will then be deleted."
(org-table-hline-and-move)))
(use-package greek-polytonic
- :straight (greek-polytonic :local-repo "~/Dev/emacs-lisp/greek-polytonic"))
+ :vc t
+ :load-path "~/Dev/emacs-lisp/greek-polytonic")
(require 'server)
(unless (server-running-p)