diff --git a/emacs/.config/emacs/Emacs.org b/emacs/.config/emacs/Emacs.org index 696807a..3f4b0de 100644 --- a/emacs/.config/emacs/Emacs.org +++ b/emacs/.config/emacs/Emacs.org @@ -92,44 +92,23 @@ :config (setq fontaine-presets '((regular - :default-height 150) + :default-height 130) (small - :default-height 110) + :default-height 80) (large :default-weight semilight - :default-height 180 + :default-height 150 :bold-weight extrabold) (extra-large :default-weight semilight - :default-height 210 + :default-height 180 :bold-weight extrabold) (t - :default-family "Iosevka Nerd Font" + :default-family "AdwaitaMono Nerd Font" :default-weight normal - :variable-pitch-family "Inter"))) + :variable-pitch-family "Adwaita Sans"))) (fontaine-set-preset 'regular)) #+end_src -** Ligatures -#+begin_src emacs-lisp - (use-package ligature - :config - (ligature-set-ligatures 't '("www")) - (ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi")) - (ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "" "---" "-<<" - "<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->" - "<--" "<-<" "<<=" "<<-" "<<<" "<+>" ">" "###" "#_(" "..<" - "..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~=" - "~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|" - "[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:" - ">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:" - "<$" "<=" "<>" "<-" "<<" "<+" "" "#{" "#[" "#:" "#=" "#!" - "##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:" - "?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)" - "\\\\" "://")) - (global-ligature-mode t)) -#+end_src ** Which key #+begin_src emacs-lisp (use-package which-key @@ -140,12 +119,6 @@ (setq which-key-idle-delay 0.3)) #+end_src ** Theme -*** Catppuccin -#+begin_src emacs-lisp - (use-package catppuccin-theme - :config - (load-theme 'catppuccin :no-confirm)) -#+end_src *** Modus Themes #+begin_src emacs-lisp (use-package emacs @@ -153,11 +126,52 @@ (require-theme 'modus-themes) (setq modus-themes-italic-constructs t modus-themes-bold-constructs t - modus-themes-links '(no-underline background faint) + modus-themes-links '(no-underline background faint) modus-themes-prompts '(bold intense) modus-themes-mode-line '(borderless accented moody) modus-themes-org-blocks 'gray-background modus-themes-region '(bg-only no-extend))) + ;; (load-theme 'modus-vivendi :no-confirm)) +#+end_src +*** Doom Themes +#+begin_src emacs-lisp + (use-package doom-themes + :custom + (doom-themes-enable-bold t) + (doom-themes-enable-italic t) + :config + (load-theme 'doom-gruvbox t) + (doom-themes-visual-bell-config) + (doom-themes-org-config)) +#+end_src +*** Italic keywords +#+begin_src emacs-lisp + (advice-add #'load-theme :after (lambda (&rest _) (set-face-italic 'font-lock-keyword-face t))) +#+end_src +** Line Numbers +#+begin_src emacs-lisp + (add-hook 'prog-mode-hook 'display-line-numbers-mode) +#+end_src +** Modeline +#+begin_src emacs-lisp + (use-package doom-modeline + :init (doom-modeline-mode 1)) +#+end_src +** Smooth Scroll +#+begin_src emacs-lisp + (use-package ultra-scroll + :init + (setq scroll-conservatively 3 + scroll-margin 0) + :config + (ultra-scroll-mode 1)) +#+end_src +* Functionality +** Navigation +*** Ace-Window +#+begin_src emacs-lisp + (use-package ace-window + :bind (("M-o" . ace-window))) #+end_src * Completion ** Vertico @@ -284,8 +298,8 @@ * Languages ** Agda #+begin_src emacs-lisp -; (load-file (let ((coding-system-for-read 'utf-8)) -; (shell-command-to-string "agda-mode locate"))) + (load-file (let ((coding-system-for-read 'utf-8)) + (shell-command-to-string "agda-mode locate"))) #+end_src ** PG #+begin_src emacs-lisp @@ -293,24 +307,24 @@ #+end_src ** Idris #+begin_src emacs-lisp - (use-package idris2-mode - :straight (:type git - :host github - :repo "idris-community/idris2-mode")) -#+end_src -** C -#+begin_src emacs-lisp - (use-package emacs - :hook - (c-mode . electric-pair-mode) + (use-package idris-mode :custom - (c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "linux")))) + (idris-interpreter-path "idris2")) #+end_src -** Prolog + +** Haskell #+begin_src emacs-lisp - (use-package ediprolog - :bind (("C-c C-e" . ediprolog-dwim))) + (use-package haskell-mode) #+end_src +** Rust +#+begin_src emacs-lisp + (use-package rust-mode + :init + (setq rust-mode-treesitter-derive t) + :hook + (rust-mode-hook . eglot-ensure)) +#+end_src + * Latex ** Auctex #+begin_src emacs-lisp @@ -407,31 +421,6 @@ 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 (use-package org - :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 (setq org-list-allow-alphabetical t) :custom @@ -440,7 +429,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/ (org-startup-with-inline-images t) (org-image-actual-width '(300)) (org-export-with-smart-quotes t) - (org-latex-preview-live t) (org-directory "~/Nextcloud/org") (org-cite-global-bibliography '("~/Nextcloud/library.bib")) (org-agenda-files `(,org-directory)) @@ -448,13 +436,31 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/ '("/todo.org" "/done.org"))) :after ox-latex :config - (setq org-format-latex-options (plist-put org-format-latex-options :scale 0.6)) (add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}" - ("\\chapter{%s}" . "\\chapter*{%s}") - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) + ("\\chapter{%s}" . "\\chapter*{%s}") + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) + (require 'org-tempo) + (add-to-list 'org-src-lang-modes '("latex-macros" . latex)) + + (defvar org-babel-default-header-args:latex-macros + '((:results . "raw") + (:exports . "results"))) + + (defun prefix-all-lines (pre body) + (with-temp-buffer + (insert body) + (string-insert-rectangle (point-min) (point-max) pre) + (buffer-string))) + + (defun org-babel-execute:latex-macros (body _params) + (concat + (prefix-all-lines "#+LATEX_HEADER: " body) + "\n#+HTML_HEAD_EXTRA: