3.4 KiB
3.4 KiB
My Org-mode Emacs Config
Doom theme
(setq doom-theme 'doom-monokai-pro)
Use nerd-font in Emacs (for better support in vterm to liquidprompt)
(setq doom-font (font-spec :family "Blex Mono Nerd Font" :size 12)
doom-big-font (font-spec :family "Blex Mono Nerd Font" :size 24)
doom-variable-pitch-font (font-spec :family "Blex Mono Nerd Font" :size 12)
doom-unicode-font (font-spec :family "Blex Mono Nerd Font")
doom-serif-font (font-spec :family "Blex Mono Nerd Font" :size 12 :weight 'light))
UI
Edition modes
Quarto
;; in $DOOMDIR/packages.el
(package! quarto-mode)
(require 'quarto-mode)
LaTeX
(setq TeX-quote-after-quote t)
Fix cdlatex
back quote binding
I want my back quotes back.
(setq cdlatex-math-symbol-prefix [f12])
Add srcartcl to ox-latex class
(eval-after-load "ox-latex"
'(add-to-list 'org-latex-classes
'("scrartcl" "\\documentclass{scrartcl}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
(setq org-latex-compiler "lualatex")
Use minted for code listings:
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"lualatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
Disable LateX preview in Org-mode by default
(setq org-startup-with-latex-preview nil)
Expand initial Frame
(add-hook 'window-setup-hook 'toggle-frame-maximized t)
Enable conda environment in a Org-mode
(require 'conda)
(conda-env-initialize-interactive-shells)
Emacs Server & Emacs Client
Emacs can be a little slow to startup: it might come useful to use Emacs server to share the initialization cost between instances.
Let's add an entry to our applications launcher, in client mode:
# In ~/.local/share/applications/emacs-client.desktop
[Desktop Entry]
Name=Emacs (Client)
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -fs -c -a "emacs" %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;Utility;
StartupWMClass=Emacs
the -fs
option enable to launch Emacs in full-screen mode at startup.
Then we start the Emacs daemon:
systemctl --user enable --now emacs
Clingo Logical Programmint / Answer Set Programming