switch from straight to package.el
This commit is contained in:
parent
53acc291e1
commit
6a7c88bc3c
1 changed files with 51 additions and 101 deletions
|
|
@ -30,34 +30,15 @@
|
||||||
auto-save-default t)
|
auto-save-default t)
|
||||||
#+end_src
|
#+end_src
|
||||||
* Packages
|
* Packages
|
||||||
** Straight.el
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(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))
|
|
||||||
#+end_src
|
|
||||||
** use-package
|
** use-package
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(straight-use-package 'use-package)
|
|
||||||
|
|
||||||
(use-package straight
|
|
||||||
:custom (straight-use-package-by-default t))
|
|
||||||
|
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
(setq use-package-verbose t)
|
(setq use-package-verbose t)
|
||||||
|
|
||||||
|
(require 'package)
|
||||||
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||||
|
(package-initialize)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Set up path correctly
|
** Set up path correctly
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -106,7 +87,7 @@
|
||||||
(t
|
(t
|
||||||
:default-family "Iosevka Nerd Font"
|
:default-family "Iosevka Nerd Font"
|
||||||
:default-weight normal
|
:default-weight normal
|
||||||
:variable-pitch-family "Adwaita Sans")))
|
:variable-pitch-family "Inter")))
|
||||||
(fontaine-set-preset 'regular))
|
(fontaine-set-preset 'regular))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Which key
|
** Which key
|
||||||
|
|
@ -168,13 +149,6 @@
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:bind (("M-o" . ace-window)))
|
:bind (("M-o" . ace-window)))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** Avy
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package avy
|
|
||||||
:bind (("C-o" . avy-goto-char))
|
|
||||||
:custom
|
|
||||||
(avy-keys . (?a ?r ?s ?t ?d ?h ?n ?e ?i ?o)))
|
|
||||||
#+end_src
|
|
||||||
* Completion
|
* Completion
|
||||||
** Vertico
|
** Vertico
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -184,8 +158,7 @@
|
||||||
#+end_src
|
#+end_src
|
||||||
** Savehist
|
** Savehist
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package savehist
|
(use-package emacs
|
||||||
:straight (:type built-in)
|
|
||||||
:init (savehist-mode))
|
:init (savehist-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** Orderless
|
** Orderless
|
||||||
|
|
@ -297,6 +270,36 @@
|
||||||
|
|
||||||
(setq consult-narrow-key "<"))
|
(setq consult-narrow-key "<"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
* Lsp
|
||||||
|
** eglot
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eglot
|
||||||
|
:bind (:map eglot-mode-map
|
||||||
|
("C-c l r" . eglot-rename)
|
||||||
|
("C-c l f" . eglot-format-buffer)
|
||||||
|
("C-c l a" . eglot-code-actions)
|
||||||
|
("C-c l q" . eglot-code-action-quickfix)
|
||||||
|
("C-c l d" . xref-find-definitions)
|
||||||
|
("C-c l i" . eglot-find-implementation)
|
||||||
|
("C-c l t" . eglot-find-type-definition)
|
||||||
|
("C-c l s" . xref-find-references)
|
||||||
|
("C-c l h" . eldoc)
|
||||||
|
("C-c l R" . eglot-restart-process)
|
||||||
|
("C-c l e" . eglot-errors-at-point))
|
||||||
|
(:map flymake-mode-map
|
||||||
|
("M-n" . flymake-goto-next-error)
|
||||||
|
("M-p" . flymake-goto-prev-error)))
|
||||||
|
#+end_src
|
||||||
|
** eldoc-box
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eldoc-box
|
||||||
|
:hook (eglot-managed-mode . eldoc-box-hover-at-point-mode))
|
||||||
|
#+end_src
|
||||||
|
** Markdown
|
||||||
|
I don't really use markdown ([[Org Mode]] is a strict improvement imo), but it's handy for rendering documentation.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package markdown-mode)
|
||||||
|
#+end_src
|
||||||
* Languages
|
* Languages
|
||||||
** Agda
|
** Agda
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -325,46 +328,21 @@
|
||||||
(use-package haskell-mode)
|
(use-package haskell-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** OCaml
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package tuareg
|
|
||||||
:mode (("\\.ocamlinit\\'" . tuareg-mode)))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Rust
|
** Rust
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
:hook
|
:hook
|
||||||
(rust-mode-hook . eglot-ensure))
|
(rust-mode-hook . eglot-ensure))
|
||||||
|
|
||||||
(use-package eglot
|
|
||||||
:straight (:type built-in)
|
|
||||||
:bind (:map eglot-mode-map
|
|
||||||
("C-c l r" . eglot-rename)
|
|
||||||
("C-c l f" . eglot-format-buffer)
|
|
||||||
("C-c l a" . eglot-code-actions)
|
|
||||||
("C-c l q" . eglot-code-action-quickfix)
|
|
||||||
("C-c l d" . xref-find-definitions)
|
|
||||||
("C-c l i" . eglot-find-implementation)
|
|
||||||
("C-c l t" . eglot-find-type-definition)
|
|
||||||
("C-c l s" . xref-find-references)
|
|
||||||
("C-c l h" . eldoc)
|
|
||||||
("C-c l R" . eglot-restart-process)
|
|
||||||
("C-c l e" . eglot-errors-at-point))
|
|
||||||
(:map flymake-mode-map
|
|
||||||
("M-n" . flymake-goto-next-error)
|
|
||||||
("M-p" . flymake-goto-prev-error)))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** KDL
|
** Zig
|
||||||
(For niri)
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package kdl-mode)
|
(use-package zig-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
* Latex
|
* Latex
|
||||||
** Auctex
|
** Auctex
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package tex-site
|
(use-package tex
|
||||||
:straight auctex
|
:ensure auctex
|
||||||
:hook
|
:hook
|
||||||
(LaTeX-mode . visual-line-mode)
|
(LaTeX-mode . visual-line-mode)
|
||||||
(LaTeX-mode . flyspell-mode)
|
(LaTeX-mode . flyspell-mode)
|
||||||
|
|
@ -453,34 +431,9 @@
|
||||||
#+end_src
|
#+end_src
|
||||||
* Org Mode
|
* Org Mode
|
||||||
** Org itself
|
** Org itself
|
||||||
I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice.
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package org
|
(use-package org
|
||||||
:defer
|
:defer
|
||||||
:straight `(org
|
|
||||||
:fork (:host nil
|
|
||||||
:repo "https://git.tecosaur.net/tec/org-mode.git"
|
|
||||||
:branch "dev"
|
|
||||||
:remote "tecosaur")
|
|
||||||
:files (:defaults "etc")
|
|
||||||
:build t
|
|
||||||
:pre-build
|
|
||||||
(with-temp-file "org-version.el"
|
|
||||||
(require 'lisp-mnt)
|
|
||||||
(let ((version
|
|
||||||
(with-temp-buffer
|
|
||||||
(insert-file-contents "lisp/org.el")
|
|
||||||
(lm-header "version")))
|
|
||||||
(git-version
|
|
||||||
(string-trim
|
|
||||||
(with-temp-buffer
|
|
||||||
(call-process "git" nil t nil "rev-parse" "--short" "HEAD")
|
|
||||||
(buffer-string)))))
|
|
||||||
(insert
|
|
||||||
(format "(defun org-release () \"The release version of Org.\" %S)\n" version)
|
|
||||||
(format "(defun org-git-version () \"The truncate git commit hash of Org mode.\" %S)\n" git-version)
|
|
||||||
"(provide 'org-version)\n")))
|
|
||||||
:pin nil)
|
|
||||||
:init
|
:init
|
||||||
(setq org-list-allow-alphabetical t)
|
(setq org-list-allow-alphabetical t)
|
||||||
:custom
|
:custom
|
||||||
|
|
@ -489,7 +442,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
(org-startup-with-inline-images t)
|
(org-startup-with-inline-images t)
|
||||||
(org-image-actual-width '(300))
|
(org-image-actual-width '(300))
|
||||||
(org-export-with-smart-quotes t)
|
(org-export-with-smart-quotes t)
|
||||||
(org-latex-preview-live t)
|
|
||||||
(org-directory "~/Nextcloud/org")
|
(org-directory "~/Nextcloud/org")
|
||||||
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
|
(org-cite-global-bibliography '("~/Nextcloud/library.bib"))
|
||||||
(org-agenda-files `(,org-directory))
|
(org-agenda-files `(,org-directory))
|
||||||
|
|
@ -503,9 +455,9 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
|
||||||
:hook (org-mode . visual-line-mode)
|
:hook
|
||||||
(org-mode . flyspell-mode)
|
(org-mode . visual-line-mode)
|
||||||
(org-mode . org-latex-preview-auto-mode))
|
(org-mode . flyspell-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
** toki pona support
|
** toki pona support
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
|
@ -559,7 +511,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
("org-static"
|
("org-static"
|
||||||
:base-directory "~/repos/blog/static/"
|
:base-directory "~/repos/blog/static/"
|
||||||
:publishing-directory "/ssh:wball@ballcloud.cc:~/blog/static/"
|
:publishing-directory "/ssh:wball@ballcloud.cc:~/blog/static/"
|
||||||
:publishing-directory "~/repos/blog/public_html/static/"
|
|
||||||
:base-extension "ico\\|ttf\\|css"
|
:base-extension "ico\\|ttf\\|css"
|
||||||
:publishing-function org-publish-attachment
|
:publishing-function org-publish-attachment
|
||||||
:recursive t
|
:recursive t
|
||||||
|
|
@ -571,7 +522,7 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
:publishing-function org-publish-attachment
|
:publishing-function org-publish-attachment
|
||||||
:recursive t
|
:recursive t
|
||||||
)
|
)
|
||||||
("org" :components ("org-posts" "org-static" "org-media"))
|
("org" :components ("org-posts" "org-static" "org-media" "org-pages"))
|
||||||
))
|
))
|
||||||
|
|
||||||
(use-package htmlize)
|
(use-package htmlize)
|
||||||
|
|
@ -606,22 +557,21 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
|
||||||
(with-eval-after-load 'esh-opt
|
(with-eval-after-load 'esh-opt
|
||||||
(setq eshell-destroy-buffer-when-process-dies t)))
|
(setq eshell-destroy-buffer-when-process-dies t)))
|
||||||
|
|
||||||
(defalias 'ff 'find-file)
|
(defalias 'eshell/ff 'find-file)
|
||||||
(defalias 'fo 'find-file-other-window)
|
(defalias 'eshell/fo 'find-file-other-window)
|
||||||
(defalias 'clear 'clear-scrollback)
|
#+end_src
|
||||||
|
** eat
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eat)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Dired
|
** Dired
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dired
|
(use-package emacs
|
||||||
:straight (:type built-in)
|
|
||||||
:commands (dired dired-jump)
|
:commands (dired dired-jump)
|
||||||
:custom ((dired-listing-switches "-agho --group-directories-first"))
|
:custom ((dired-listing-switches "-agho --group-directories-first"))
|
||||||
:config
|
:config
|
||||||
(require 'dired-x))
|
(require 'dired-x))
|
||||||
|
|
||||||
(use-package dired-single
|
|
||||||
:after dired)
|
|
||||||
|
|
||||||
(use-package dired-hide-dotfiles
|
(use-package dired-hide-dotfiles
|
||||||
:hook (dired-mode . dired-hide-dotfiles-mode))
|
:hook (dired-mode . dired-hide-dotfiles-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue