diff --git a/config.org b/config.org index 2198adc..f51543c 100644 --- a/config.org +++ b/config.org @@ -12,6 +12,14 @@ doom-serif-font (font-spec :family "Fira Code Nerd Font" :size 12 :weight 'light)) #+end_src * UI +#+begin_src emacs-lisp :tangle yes +(setq confirm-kill-emacs nil) +#+end_src +** Expand initial Frame + +#+begin_src emacs-lisp :tangle yes +(add-hook 'window-setup-hook 'toggle-frame-maximized t) +#+end_src * Edition modes @@ -50,9 +58,30 @@ Add custom LaTeX classes to ox-latex class. ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + (add-to-list 'org-latex-classes + '("scrreprt" "\\documentclass{scrreprt}" + ("\\part{%s}" . "\\part*{%s}") + ("\\chapter{%s}" . "\\chapter*{%s}") + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + (add-to-list 'org-latex-classes + '("lamme2024" "\\documentclass{scrartcl} + [NO-DEFAULT-PACKAGES] + [NO-PACKAGES] + [EXTRA] + " + ("\\part{%s}" . "\\part*{%s}") + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\subsubsubsection{%s}" . "\\subsubsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) - (eval-after-load "ox-latex" #'custom-latex-classes) #+end_src @@ -82,17 +111,19 @@ Disable LateX preview in Org-mode by default *** Syntax highlighting in Org-mode #+begin_src emacs-lisp :tangle yes -(setq org-highlight-latex-and-related '(latex script entities)) +; (setq org-highlight-latex-and-related '(latex script entities)) +(setq org-highlight-latex-and-related '(native)) +;; (add-hook 'org-mode-hook #'turn-on-org-cdlatex) + #+end_src \(i \in \mathbf{N}\) -** Expand initial Frame - +*** Proper indentation in algorithmic #+begin_src emacs-lisp :tangle yes -(add-hook 'window-setup-hook 'toggle-frame-maximized t) +(with-eval-after-load 'latex + (add-to-list 'LaTeX-indent-environment-list '("algorithmic" current-indentation))) #+end_src - ** Enable conda environment in a Org-mode #+begin_src emacs-lisp :tangle no @@ -102,7 +133,14 @@ Disable LateX preview in Org-mode by default ** Org-roam Set the roam directory #+begin_src emacs-lisp -(setq org-roam-directory "~/sync/Documents/org/roam/") +(setq org-roam-directory "~/Documents/org/roam/") +#+end_src + +** =typst= +#+begin_src emacs-lisp :tangle no +(add-to-list 'treesit-language-source-alist + '(typst "https://github.com/uben0/tree-sitter-typst")) +(treesit-install-language-grammar 'typst) #+end_src * Emacs Server & Emacs Client @@ -154,7 +192,7 @@ systemctl --user enable --now emacs ;; (setq plantuml-default-exec-mode 'jar) (setq plantuml-executable-path "/usr/bin/plantuml") ;; setup plantuml for org-babel - (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)) + ;; (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)) (setq org-plantuml-exec-mode 'executable) (setq org-plantuml-executable-path plantuml-executable-path) ;; (require 'ob-plantuml) ; OBSOLETED @@ -164,3 +202,43 @@ systemctl --user enable --now emacs (add-to-list 'auto-mode-alist '("\\.puml\\'" . plantuml-mode)) (add-to-list 'auto-mode-alist '("\\.plantuml\\'" . plantuml-mode)) #+end_src + + +* Org-ref-acronyms + +#+begin_src emacs-lisp :tangle yes +(after! org + (require 'org-ref) + (add-to-list 'org-latex-classes + '("scientific-project" + "\\documentclass{scrreprt} + [NO-DEFAULT-PACKAGES] + [EXTRA] + \\makeindex + \\makeglossaries " + +; ("\\part{%s}" . "\\part*{%s}") + ("\\chapter{%s}" . "\\chapter{%s}") + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) + (add-hook 'org-export-before-parsing-hook #'org-ref-acronyms-before-parsing) + (add-hook 'org-export-before-parsing-hook #'org-ref-glossary-before-parsing)) +#+end_src + +#+RESULTS: +| org-ref-glossary-before-parsing | org-ref-acronyms-before-parsing | org-attach-expand-links | +| org-ref-glossary-before-parsing | org-ref-acronyms-before-parsing | org-attach-expand-links | + +#+begin_src emacs-lisp :tangle yes +(after! org (org-add-link-type + "latex" nil + (lambda (path desc format) + (cond + ((eq format 'html) + (format "%s" path desc)) + ((eq format 'latex) + (format "\\%s{%s}" path desc)))))) +#+end_src diff --git a/init.el b/init.el index 4513388..5b108d1 100644 --- a/init.el +++ b/init.el @@ -31,21 +31,21 @@ ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs - doom-quit ; DOOM quit-message prompts when you quit Emacs + ;;doom-quit ; DOOM quit-message prompts when you quit Emacs (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra indent-guides ; highlighted indent columns - ligatures ; ligatures and symbols to make your code pretty again + ;;ligatures ; ligatures and symbols to make your code pretty again ;;minimap ; show a map of the code on the side modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink cursor line after big motions ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup +defaults) ; tame sudden yet inevitable temporary windows - tabs ; a tab bar for Emacs + ;;tabs ; a tab bar for Emacs treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages + unicode ; extended unicode support for various languages (vc-gutter +pretty) ; vcs diff in the fringe vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows @@ -68,8 +68,8 @@ :emacs dired ; making dired pretty [functional] - electric ; smarter, keyword-based electric-indent - ibuffer ; interactive buffer management + ;;electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management undo ; persistent, smarter undo for your inevitable mistakes vc ; version-control and Emacs, sitting in a tree @@ -82,7 +82,7 @@ :checkers syntax ; tasing you for every semicolon you forget (spell +flyspell) ; tasing you for misspelling mispelling - grammar ; tasing grammar mistake every you make + ;;grammar ; tasing grammar mistake every you make :tools ;;ansible @@ -92,7 +92,7 @@ ;;direnv ;;docker editorconfig ; let someone else argue about tabs vs spaces - ein ; tame Jupyter notebooks with emacs + ;;ein ; tame Jupyter notebooks with emacs (eval +overlay) ; run code, run (also, repls) ;;gist ; interacting with github gists lookup ; navigate your code and its documentation @@ -100,7 +100,7 @@ magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds - pdf ; pdf enhancements + ;;pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects @@ -116,7 +116,7 @@ :lang ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP - (cc +lsp) ; C > C++ == 1 + cc ; C > C++ == 1 ;;clojure ; java with a lisp common-lisp ; if you've seen one lisp, you've seen them all coq ; proofs-as-programs @@ -132,12 +132,12 @@ ess ; emacs speaks statistics ;;factor ;;faust ; dsp, but you get to keep your soul - ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;gdscript ; the language you waited for ;;(go +lsp) ; the hipster dialect - ;;(graphql +lsp) ; Give queries a REST + (graphql +lsp) ; Give queries a REST (haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on @@ -145,9 +145,9 @@ (java +lsp) ; the poster child for carpal tunnel syndrome javascript ; all(hope(abandon(ye(who(enter(here)))))) julia ; a better, faster MATLAB - kotlin ; a better, slicker Java(Script) + ;;kotlin ; a better, slicker Java(Script) latex ; writing papers in Emacs has never been so fun - lean ; for folks with too much to prove + ;;lean ; for folks with too much to prove ;;ledger ; be audit you can be lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore @@ -156,7 +156,7 @@ (ocaml +lsp) ; an objective camel (org +roam2 +hugo +pandoc +brain) ; organize your plain life in plain text php ; perl's insecure younger brother - ;;plantuml ; diagrams for confusing people more + plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional python ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever @@ -164,7 +164,7 @@ raku ; the artist formerly known as perl6 ;;rest ; Emacs as a REST client rst ; ReST in peace - ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() scala ; java, but good (scheme +guile) ; a fully conniving family of lisps diff --git a/packages.el b/packages.el index a078a9e..75f7bba 100644 --- a/packages.el +++ b/packages.el @@ -48,20 +48,24 @@ ;(unpin! pinned-package another-pinned-package) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;(unpin! t) - - ; (package! conda) +; (package! conda) (package! quarto-mode) -(package! org-elp) - +;; (package! org-elp) (package! pasp-mode) (package! ob-pasp - :recipe (:host github :repo "UncleSamulus/ob-pasp")) + :recipe (:host github :repo "samuelortion/ob-pasp")) -(package! ox-hugo) +;; (package! ox-hugo) (package! groovy-mode) (package! nextflow-mode :recipe (:host github :repo "emiller88/nextflow-mode")) + +;; typst +;;(package! typst-ts-mode :recipe +;; (:host sourcehut :repo "meow_king/typst-ts-mode")) + +(package! org-ref)