Compare commits

...

39 Commits

Author SHA1 Message Date
e5b0a6fea9 Remove <LAB Template 2023-08-16 20:55:21 -04:00
fa12655fb4 Tangle & Cleanup 2023-08-16 20:37:50 -04:00
518c99427f Flake ++ Org Config 2023-08-15 23:17:52 -04:00
ba2fce5bda config changes 2023-08-14 20:56:28 -04:00
3217d914f0 D2 Mode 2023-07-27 13:30:01 -04:00
03a9af3a23 Cleanup org And Flutter 2023-07-27 13:29:27 -04:00
David Crompton
3d0b837db0 Add Python Poetry 2023-07-27 13:29:27 -04:00
5b67b0a2d8 Yaml, Meson, Verilog and VHDL 2023-07-09 19:04:19 -04:00
64cf3bece4 Python Mode 2023-03-03 22:35:37 -05:00
David Crompton
35e51cf1c7 Rust lsp hook 2023-03-03 22:32:57 -05:00
cb70fc11cc Remove Extra ) 2023-01-25 13:52:34 -05:00
84da3e2945 Fix Custom.el Conflicts 2023-01-25 13:23:24 -05:00
2a1b99f216 Flyspell: Aspell 2023-01-25 13:21:04 -05:00
eefa8910e8 Git ignore and latex preview 2023-01-25 13:20:30 -05:00
d2a1f49903 Changes bb 2023-01-25 13:18:38 -05:00
c6f5cf58e7 Merge remote-tracking branch 'origin/master' 2022-12-05 10:54:36 -05:00
5c311b83d4 Add ligature support
Disabled prof perf'ing
2022-12-05 10:52:48 -05:00
93683d65c6 Remove Unused pyvenv. Change Default Interpreter 2022-12-05 10:20:08 -05:00
4adf6fac65 Actually fix Julia 2022-12-02 13:44:05 -05:00
0f7dfd76ca Fix JuliaFont on mac 2022-12-02 13:42:42 -05:00
8a7bde8bb0 BQN Use Default Font 2022-12-02 13:40:50 -05:00
4a38e1b8cb Update Font to JuliaMono 2022-12-02 12:44:21 -05:00
b0d9318138 BQN 2022-12-01 21:59:33 -05:00
534f6d8ade Java lsp 2022-12-01 20:59:30 -05:00
016c60a6d5 Minecraft mcFunction support 2022-11-06 13:13:02 -05:00
a8407bfb86 Add Rust 2022-11-04 13:27:59 -04:00
b898db21c0 Revert "Org: Removed Pandoc Export"
This reverts commit 6fe09f527b.
2022-08-17 09:54:22 -04:00
6fe09f527b Org: Removed Pandoc Export 2022-08-17 09:50:30 -04:00
fa93796655 Fix conflicts between laptop and Desktop 2022-07-24 15:47:16 -04:00
7649705208 DOI utils 2022-07-24 15:42:02 -04:00
e4b1daa21d Add nix and version control 2022-07-24 15:37:35 -04:00
8a623a4dd1 Fix org mode 2022-07-21 18:27:19 -04:00
31978a2d47 Ignore elpa 2022-07-21 18:04:15 -04:00
5662cb70bd Haskell Update 2022-02-05 14:45:34 -05:00
0d934b57d7 Fixed Python env 2022-01-13 17:09:48 -05:00
d34db3b031 Fix hoc mode slightly, and add more hooks to python and org mode 2021-11-24 15:36:39 -05:00
8152a1ae0b hoc-mode update 2021-10-03 18:57:34 -04:00
0939ef0be8 LSP & Hoc mode 2021-09-25 16:01:58 -04:00
0d8991504f Elpy Setup, Racket & Neuron 2021-09-24 09:32:20 -04:00
9 changed files with 811 additions and 447 deletions

214
#init.el#
View File

@@ -1,214 +0,0 @@
;; -*- lexical-binding: t -*-
;; Bootstrap straight.el for package management
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; Disable package.el from loading at startup
(setq package-enable-at-startup nil)
(ad
;; Ensure custom writes to specific file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file 'noerror 'nomessage)
;; Change the location of file backups/locks into the emacs.d/backups/
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
;;;; VISUAL
;; Disable Scroll bar, menubar
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
;; Set location of custom theme dir
(setq custom-theme-directory (concat user-emacs-directory "themes"))
(load-theme 'UniverseHighContrast)
;;;; END VISUAL
;;;; PACKAGE INSTALL AND CONFIG
;; Set the packagemanager of use-package
(setq straight-use-package-by-default t)
;; Default to lazy loading
(setq use-package-always-defer t)
;; Ensure use-package.el is installed
(straight-use-package 'use-package)
;; Ensure shell variables are loaded
(use-package exec-path-from-shell
:init
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
)
;; Profiling
(use-package esup)
;; Prevents emacs and packages from messily writing to dirs
(use-package no-littering
:demand t)
;;;; Science Related
(use-package conda)
;;;; End Science Related
;;;; Web Related
(use-package web-mode
:init
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
)
(use-package php-mode)
;;;; End Web related
;;;; C Related
(use-package irony
:init
(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
)
;;;; End C Related
;;;; Company Related
(use-package company :demand t
:bind
(("C-<tab>" . company-complete))
:custom-face
(company-preview ((t (:background "#000000" :foreground "#ffffff"))))
(company-preview-common ((t (:inherit company-preview :foreground "#ff00cf"))))
(company-preview-search ((t (:inherit company-preview :background "black"))))
(company-scrollbar-bg ((t (:background "grey35"))))
(company-scrollbar-fg ((t (:background "#a22390"))))
(company-template-field ((t (:background "grey75" :foreground "black"))))
(company-tooltip ((t (:background "#353535" :foreground "white"))))
(company-tooltip-common ((t (:foreground "magenta"))))
(company-tooltip-mouse ((t (:inherit company-tooltip-selection))))
(company-tooltip-search ((t (:inherit company-tooltip-selection))))
(company-tooltip-search-selection ((t (:inherit company-tooltip-selection))))
(company-tooltip-selection ((t (:background "#4584a2" :foreground "white"))))
)
(add-hook 'after-init-hook 'global-company-mode)
; Python
(use-package company-jedi)
; C related
(use-package company-ctags)
(use-package company-c-headers)
(use-package company-irony)
; Haskell
(use-package company-ghci)
;;;; End Company Related
;;;; Haskell Related
(use-package haskell-mode
:config
(setq haskell-mode-hook '(flyspell-prog-mode interactive-haskell-mode))
)
(use-package ghci-completion)
;;;; End Haskell Related
;;;; Org Related
;; (use-package org)
(use-package org-contrib)
(use-package org
:config
(require 'org-tempo)
(tempo-define-template
"Lab Template" '("#+TITLE: PHY324: LAB TITLE"n
"#+AUTHOR: ***REMOVED*** | ***REMOVED***"n
"#+DATE: \\today"n
"#+LATEX_HEADER: \\usepackage{natbib}"n
"#+LATEX_HEADER: \\usepackage{float}"n
"#+LATEX_CLASS: labtemplate"n
"#+OPTIONS: toc:nil"n
""n
"* Abstract:"n
"* Introduction:"n > p
"* Methods:"n
"* Results:"n
"* Discussion:"n
"bibliographystyle:ieeetr"n
"bibliography:~/Documents/Bibliography/references.bib" >)
"<LAB" "Insert Lab Template With Headings")
(tempo-define-template "Fig. Caption"
'("" (P "Image: " image t)
(P "Caption: " caption t)
(P "Figure Name: " name t)
"#+CAPTION: " (s caption) > n >
"#+NAME: fig:" (s name) > n >
"#+ATTR_LaTeX: :placement [H]" > n >
"[[" (s image) "]]" > n > p >)
"<fig" "Inserts Figure with Caption")
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-classes
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
(setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "bibtex %b" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
)
; References etc.
(use-package org-ref
:after org
:defer t
:config
(setq reftex-default-bibliography '("~/Documents/Bibliography/references.bib"))
;; see org-ref for use of these variables
(setq org-ref-bibliography-notes "~/Documents/Bibliography/notes.org"
org-ref-default-bibliography '("~/Documents/Bibliography/references.bib")
org-ref-pdf-directory "~/Documents/Bibliography/bibtex-pdfs/")
)
; PDF preview etc.
(use-package pdf-tools)
; better TEX
(use-package auctex
:after org)
; Plotting support
(use-package gnuplot)
;;Org Auto Wrap Config
(add-hook 'org-mode-hook 'auto-fill-mode)
(set-fill-column 100)
;;;; End Org Related
;; ghci-completion company-ghci
;; exec-path-from-shell nix-haskell-mode haskell-mode
;; pyvenv rainbow-mode company-ctags company-jedi
;; company-anaconda anaconda-mode matlab-mode markdown-mode company-irony-c-headers company-irony irony rust-mode company-c-headers cdlatex auctex use-package smog conda gnuplot php-mode web-mode org-ref pdf-tools chess
;;;; END PACKAGES

9
.gitignore vendored
View File

@@ -5,3 +5,12 @@
/tutorial/
/var/
tramp
/elpy/
/elpa/
/eln-cache/
/%backup%~
/el-get/
/main.el
/result
/transient/
/BROWSE

176
custom.el
View File

@@ -5,22 +5,170 @@
;; If there is more than one, they won't work right.
'(conda-anaconda-home "~/opt/anaconda3")
'(custom-safe-themes
'("29addd67feb95ca1179e60d476bb92c1f11835548e2efaec15c9ac6af2a8e6a8" "9b7a425c38c4894e161887c26381c2a6fc1de3c1407158507caaf469d76eb27b" "bce055e1681dd343659957710af77f7a6ad106677d42c61f86ebeedf637c4493" "f62c69472d3f506179d797131c014fe4095d9609dddf14542c50e0388f1e8d6d" "cf143bf23fa8160f87331893cdadc40b876556634621dfa373fcf93c4c97c444" "f459dfd377e9cb98d90e53383dcca7d73396cc0a22b31d39af24fb1cf3548fb5" "fcc14e1a22c99d77f7b1455b0c8a320f8afd0c1f4a9c5c50b45f676eb0c54ba2" "a6bae299481c3c0058e611d2c32ca169fa27203345a880806a5a8554cdd2e588" "feb9556e03558588e29e6659c8e01ea3d2a17a1e7a13e9bf9fc9e59cacba4b72" default))
'(python-shell-process-environment '("PYTHONBREAKPOINT=")))
'("5f79df6b4c56021d173c178d90b5a600c678a192d78cc639553915985b67c4ea" "8cda1cfae8e393bfb23f1d448d4be10720835d086f7db080908a7c8d01566516" "a27f7b52fe66bacaec9059f8afd04d055a4ac3c2fba9eb9128c81e10152fc566" "1ba7196d8e7b883272ea8818a5163aec21b57023368febf55255816226f7b370" "8256e7e03444834d34915a226dc24933b0d680a0a1da568ec03f852be776f168" "4ac2f45e6b46e5bb50826d4250df71a57124169b82cc0ad75e436de6e70a9690" "29addd67feb95ca1179e60d476bb92c1f11835548e2efaec15c9ac6af2a8e6a8" "9b7a425c38c4894e161887c26381c2a6fc1de3c1407158507caaf469d76eb27b" "bce055e1681dd343659957710af77f7a6ad106677d42c61f86ebeedf637c4493" "f62c69472d3f506179d797131c014fe4095d9609dddf14542c50e0388f1e8d6d" "cf143bf23fa8160f87331893cdadc40b876556634621dfa373fcf93c4c97c444" "f459dfd377e9cb98d90e53383dcca7d73396cc0a22b31d39af24fb1cf3548fb5" "fcc14e1a22c99d77f7b1455b0c8a320f8afd0c1f4a9c5c50b45f676eb0c54ba2" "a6bae299481c3c0058e611d2c32ca169fa27203345a880806a5a8554cdd2e588" "feb9556e03558588e29e6659c8e01ea3d2a17a1e7a13e9bf9fc9e59cacba4b72" default))
'(delete-selection-mode nil)
'(dired-listing-switches "-alh")
'(elpy-rpc-python-command "python3")
'(lsp-dart-flutter-sdk-dir "~/flutter")
'(lsp-file-watch-ignored-directories
'("[/\\\\]\\.git\\'" "[/\\\\]\\.github\\'" "[/\\\\]\\.circleci\\'" "[/\\\\]\\.hg\\'" "[/\\\\]\\.bzr\\'" "[/\\\\]_darcs\\'" "[/\\\\]\\.svn\\'" "[/\\\\]_FOSSIL_\\'" "[/\\\\]\\.idea\\'" "[/\\\\]\\.ensime_cache\\'" "[/\\\\]\\.eunit\\'" "[/\\\\]node_modules" "[/\\\\]\\.yarn\\'" "[/\\\\]\\.fslckout\\'" "[/\\\\]\\.tox\\'" "[/\\\\]dist\\'" "[/\\\\]dist-newstyle\\'" "[/\\\\]\\.stack-work\\'" "[/\\\\]\\.bloop\\'" "[/\\\\]\\.metals\\'" "[/\\\\]target\\'" "[/\\\\]\\.ccls-cache\\'" "[/\\\\]\\.vscode\\'" "[/\\\\]\\.venv\\'" "[/\\\\]\\.mypy_cache\\'" "[/\\\\]\\.deps\\'" "[/\\\\]build-aux\\'" "[/\\\\]autom4te.cache\\'" "[/\\\\]\\.reference\\'" "[/\\\\]\\.lsp\\'" "[/\\\\]\\.clj-kondo\\'" "[/\\\\]\\.shadow-cljs\\'" "[/\\\\]\\.babel_cache\\'" "[/\\\\]\\.cpcache\\'" "[/\\\\]\\checkouts\\'" "[/\\\\]\\.m2\\'" "[/\\\\]bin/Debug\\'" "[/\\\\]obj\\'" "[/\\\\]_opam\\'" "[/\\\\]_build\\'" "[/\\\\]\\.elixir_ls\\'" "[/\\\\]\\.direnv\\'" "[/\\\\]\\.tmp\\'"))
'(lsp-java-format-on-type-enabled nil)
'(lsp-java-format-settings-profile nil)
'(lsp-pylsp-plugins-jedi-use-pyenv-environment t)
'(org-agenda-files
'("~/Documents/research/DBS/TechnicalEvaluation/technicaldraft.org" "/Users/universelaptop/Documents/research/CommitteeMeetings/First/Report/David_Crompton_Masters_Supervisory_Committee_Meeting_Report.org" "/Users/universelaptop/Documents/research/thesis/Ideas/ModelDetails.org" "/Users/universelaptop/Documents/uoft/JPB1071/WrittenAssignment/Crompton_David_1004162434_JPB1071_Written_Assignment.org"))
'(org-export-backends '(ascii beamer html icalendar latex odt))
'(org-latex-classes
'(("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("beamer" "\\documentclass[presentation]{beamer}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("letter" "\\documentclass{letter}"
("" . ""))))
'(org-preview-latex-process-alist
'((dvipng :programs
("latex" "dvipng")
:description "dvi > png" :message "you need to install the programs: latex and dvipng." :image-input-type "dvi" :image-output-type "png" :image-size-adjust
(2.0 . 2.0)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvipng -D %D -T tight -o %O %f")
:transparent-image-converter
("dvipng -D %D -T tight -bg Transparent -o %O %f"))
(dvisvgm :programs
("latex" "dvisvgm")
:description "dvi > svg" :message "you need to install the programs: latex and dvisvgm." :image-input-type "dvi" :image-output-type "svg" :image-size-adjust
(1.7 . 1.5)
:latex-compiler
("latex -interaction nonstopmode -output-directory %o %f")
:image-converter
("dvisvgm %f -n -b min -c %S -o %O"))
(imagemagick :programs
("latex" "convert")
:description "pdf > png" :message "you need to install the programs: latex and imagemagick." :image-input-type "pdf" :image-output-type "png" :image-size-adjust
(1.0 . 1.0)
:latex-compiler
("pdflatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O"))))
'(package-selected-packages
'(lsp-dart dart-mode gnuplot auctex ox-pandoc pdf-tools org-ref helm-bibtex ivy-bibtex geiser-racket rainbow-delimiters rust-mode company-ghci lsp-haskell haskell-mode meson-mode company-c-headers company-ctags poetry python-mode which-key dap-mode helm-lsp lsp-treemacs flycheck lsp-ui lsp-mode company yaml-mode d2-mode php-mode web-mode nix-mode direnv magit esup ligature exec-path-from-shell transient-dwim leaf-convert leaf-tree blackout hydra el-get leaf-keywords leaf))
'(python-shell-completion-native-enable nil)
'(sql-sqlite-program "sqlite3")
'(warning-suppress-types '((comp) (comp) (comp) (comp) (comp))))
'(org-latex-classes
'(("thesis" "\\documentclass{ut-thesis}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("beamer" "\\documentclass[presentation]{beamer}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("article" "\\documentclass[11pt]{article}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("letter" "\\documentclass{letter}"
("" . ""))
("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
'(org-latex-default-packages-alist
'(("AUTO" "inputenc" t
("pdflatex"))
("T1" "fontenc" t
("pdflatex"))
("" "graphicx" t nil)
("" "grffile" t nil)
("" "longtable" nil nil)
("" "wrapfig" nil nil)
("" "rotating" nil nil)
("normalem" "ulem" t nil)
("" "amsmath" t nil)
("" "textcomp" t nil)
("" "amssymb" t nil)
("" "capt-of" nil nil)
("" "hyperref" nil nil)))
'(org-pandoc-menu-entry
'((61 "to ms-pdf and open." org-pandoc-export-to-ms-pdf-and-open)
(45 "to ms-pdf." org-pandoc-export-to-ms-pdf)
(106 "to json and open." org-pandoc-export-to-json-and-open)
(74 "as json." org-pandoc-export-as-json)
(80 "to pptx." org-pandoc-export-to-pptx)
(120 "to docx and open." org-pandoc-export-to-docx-and-open)
(88 "to docx." org-pandoc-export-to-docx)))
'(python-shell-completion-native-enable nil)
'(warning-suppress-log-types
'((direnv)
(lsp-mode)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)))
'(warning-suppress-types
'((lsp-mode)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)
(comp)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(company-preview ((t (:background "#000000" :foreground "#ffffff"))))
'(company-preview-common ((t (:inherit company-preview :foreground "#ff00cf"))))
'(company-preview-search ((t (:inherit company-preview :background "black"))))
'(company-scrollbar-bg ((t (:background "grey35"))))
'(company-scrollbar-fg ((t (:background "#a22390"))))
'(company-template-field ((t (:background "grey75" :foreground "black"))))
'(company-tooltip ((t (:background "#353535" :foreground "white"))))
'(company-tooltip-common ((t (:foreground "magenta"))))
'(company-tooltip-mouse ((t (:inherit company-tooltip-selection))))
'(company-tooltip-search ((t (:inherit company-tooltip-selection))))
'(company-tooltip-search-selection ((t (:inherit company-tooltip-selection))))
'(company-tooltip-selection ((t (:background "#4584a2" :foreground "white")))))
'(default ((t (:family "JuliaMono" :height 150 :weight normal))) nil "Customized with leaf in `visual' block at `/home/universe/.emacs.d/main.el'"))

133
flake.lock generated Normal file
View File

@@ -0,0 +1,133 @@
{
"nodes": {
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1692037570,
"narHash": "sha256-bvj/wfLLFTc8cWAwhN8tgShiy8ekPWt1+gWlEH7W4zY=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "7a4b5bbc06182e2f704630cd77a614ab0d9c2f2e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1691990649,
"narHash": "sha256-gMbKOiX1HwClRP9lADaaV/lnZr93NEaOFe4ApDx/zd8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6e287913f7b1ef537c97aa301b67c34ea46b640f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1691950488,
"narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "720e61ed8de116eec48d6baea1d54469b536b985",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

23
flake.nix Normal file
View File

@@ -0,0 +1,23 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.emacs-overlay.url = "github:nix-community/emacs-overlay";
inputs.emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, emacs-overlay }:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
emacs-overlay.overlays.default
];
};
in {
packages = {
emacs = pkgs.emacsWithPackagesFromUsePackage {
config = ./main.org;
package = pkgs.emacs29;
};
};
});
}

24
hoc-mode.el Normal file
View File

@@ -0,0 +1,24 @@
;;; hoc-mode.el -- mode for editing NEURON hox files
;; (setq hoc-mode-keywords "proc\\|objref\\|create\\|public\\|begintemplate\\|endtemplate\\|access\\|if\\|for")
(setq hoc-mode-highlights
'(
( "proc\\|objref\\|create\\|public\\|begintemplate\\|endtemplate\\|access\\|if\\|for" . font-lock-keyword-face)
( "[a-z0-9A-Z_]+?[ \n\t]*\\((\\)" . font-lock-function-name-face)
( "//.+" . font-lock-comment-face)
( "/\*" . font-lock-comment-start-skip)
( "\*/" . font-lock-comment-end-skip)
)
)
(define-derived-mode hoc-mode
prog-mode "hoc"
"Major mode for NEURON Hoc."
(setq comment-start "//")
(setq font-lock-defaults '(hoc-mode-highlights))
)
(provide 'hoc-mode)
;;; hoc-mode.el ends here

239
init.el
View File

@@ -1,221 +1,26 @@
;; -*- lexical-binding: t -*-
;;; init.el --- Where all the magic begins
;;
;; This file loads Org and then loads the rest of our Emacs initialization from Emacs lisp
;; embedded in literate Org files.
;; Bootstrap straight.el for package management
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; Disable package.el from loading at startup
(setq package-enable-at-startup nil)
;; Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode files
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
;; Ensure custom writes to specific file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file 'noerror 'nomessage)
(let* ((org-dir (expand-file-name
"lisp" (expand-file-name
"org" (expand-file-name
"src" dotfiles-dir))))
(org-contrib-dir (expand-file-name
"lisp" (expand-file-name
"contrib" (expand-file-name
".." org-dir))))
(load-path (append (list org-dir org-contrib-dir)
(or load-path nil))))
;; load up Org and Org-babel
(require 'org)
(require 'ob-tangle))
;; Change the location of file backups/locks into the emacs.d/backups/
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))
;; load up all literate org-mode files in this directory
(mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$"))
;;;; VISUAL
;; Disable Scroll bar, menubar
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
;; Set location of custom theme dir
(setq custom-theme-directory (concat user-emacs-directory "themes"))
(load-theme 'UniverseHighContrast)
;;;; END VISUAL
;;;; PACKAGE INSTALL AND CONFIG
;; Set the packagemanager of use-package
(setq straight-use-package-by-default t)
;; Default to lazy loading
(setq use-package-always-defer t)
;; Ensure use-package.el is installed
(straight-use-package 'use-package)
;; Ensure shell variables are loaded
(use-package exec-path-from-shell
:init
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
)
;; Profiling
(use-package esup)
;; Prevents emacs and packages from messily writing to dirs
(use-package no-littering
:demand t)
;;;; Science Related
(use-package conda)
;;;; End Science Related
;;;; Web Related
(use-package web-mode
:init
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
)
(use-package php-mode)
;;;; End Web related
;;;; C Related
(use-package irony
:init
(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode)
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
)
;;;; End C Related
;;;; Company Related
(use-package company :demand t
:bind
(("C-<tab>" . company-complete))
:custom-face
(company-preview ((t (:background "#000000" :foreground "#ffffff"))))
(company-preview-common ((t (:inherit company-preview :foreground "#ff00cf"))))
(company-preview-search ((t (:inherit company-preview :background "black"))))
(company-scrollbar-bg ((t (:background "grey35"))))
(company-scrollbar-fg ((t (:background "#a22390"))))
(company-template-field ((t (:background "grey75" :foreground "black"))))
(company-tooltip ((t (:background "#353535" :foreground "white"))))
(company-tooltip-common ((t (:foreground "magenta"))))
(company-tooltip-mouse ((t (:inherit company-tooltip-selection))))
(company-tooltip-search ((t (:inherit company-tooltip-selection))))
(company-tooltip-search-selection ((t (:inherit company-tooltip-selection))))
(company-tooltip-selection ((t (:background "#4584a2" :foreground "white"))))
)
(add-hook 'after-init-hook 'global-company-mode)
; Python
(use-package company-jedi)
(defun my/python-mode-hook ()
(add-to-list 'company-backends 'company-jedi))
(add-hook 'python-mode-hook 'my/python-mode-hook)
; C related
(use-package company-ctags)
(use-package company-c-headers)
(use-package company-irony)
; Haskell
(use-package company-ghci)
;;;; End Company Related
;;;; Haskell Related
(use-package haskell-mode
:config
(setq haskell-mode-hook '(flyspell-prog-mode interactive-haskell-mode))
)
(use-package ghci-completion)
;;;; End Haskell Related
;;;; Org Related
;; (use-package org)
(use-package org-contrib)
(use-package org
:config
(require 'org-ref)
(require 'org-tempo)
(tempo-define-template
"Lab Template" '("#+TITLE: PHY324: LAB TITLE"n
"#+AUTHOR: ***REMOVED*** | ***REMOVED***"n
"#+DATE: \\today"n
"#+LATEX_HEADER: \\usepackage{natbib}"n
"#+LATEX_HEADER: \\usepackage{float}"n
"#+LATEX_CLASS: labtemplate"n
"#+OPTIONS: toc:nil"n
""n
"* Abstract:"n
"* Introduction:"n > p
"* Methods:"n
"* Results:"n
"* Discussion:"n
"bibliographystyle:ieeetr"n
"bibliography:~/Documents/Bibliography/references.bib" >)
"<LAB" "Insert Lab Template With Headings")
(tempo-define-template "Fig. Caption"
'("" (P "Image: " image t)
(P "Caption: " caption t)
(P "Figure Name: " name t)
"#+CAPTION: " (s caption) > n >
"#+NAME: fig:" (s name) > n >
"#+ATTR_LaTeX: :placement [H]" > n >
"[[" (s image) "]]" > n > p >)
"<fig" "Inserts Figure with Caption")
(with-eval-after-load 'ox-latex
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-classes
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
(setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "bibtex %b" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f" "%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
)
; References etc.
(use-package org-ref
:after org
:defer t
:config
(setq reftex-default-bibliography '("~/Documents/Bibliography/references.bib"))
;; see org-ref for use of these variables
(setq org-ref-bibliography-notes "~/Documents/Bibliography/notes.org"
org-ref-default-bibliography '("~/Documents/Bibliography/references.bib")
org-ref-pdf-directory "~/Documents/Bibliography/bibtex-pdfs/")
)
(use-package ox-pandoc
:after org)
; PDF preview etc.
(use-package pdf-tools)
; better TEX
(use-package auctex
:after org)
; Plotting support
(use-package gnuplot)
;;Org Auto Wrap Config
(add-hook 'org-mode-hook 'auto-fill-mode)
(set-fill-column 100)
;;;; End Org Related
;; ghci-completion company-ghci
;; exec-path-from-shell nix-haskell-mode haskell-mode
;; pyvenv rainbow-mode company-ctags company-jedi
;; company-anaconda anaconda-mode matlab-mode markdown-mode company-irony-c-headers company-irony irony rust-mode company-c-headers cdlatex auctex use-package smog conda gnuplot php-mode web-mode org-ref pdf-tools chess
;;;; END PACKAGES
;;; init.el ends here

414
main.org Normal file
View File

@@ -0,0 +1,414 @@
#+options: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline
#+options: author:t broken-links:nil c:nil creator:nil
#+options: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:t
#+options: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t
#+options: timestamp:t title:t toc:t todo:t |:t
#+title: Universe Emacs Config
#+author:
#+language: en
* Intialization
We must initialize =leaf.el=, which we use as a use-package
replacement for defining configs for different things.
#+begin_src elisp :tangle yes
;; <leaf-install-code>
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'leaf)
(package-refresh-contents)
(package-install 'leaf))
(leaf leaf-keywords
:ensure t
:init
(leaf el-get :ensure t)
(leaf hydra :ensure t)
(leaf blackout :ensure t)
:config
;; initialize leaf-keywords.el
(leaf-keywords-init)))
;; </leaf-install-code>
(leaf leaf-tree :ensure t)
(leaf leaf-convert :ensure t)
(leaf transient-dwim
:ensure t
:bind (("M-=" . transient-dwim-dispatch)))
#+end_src
#+begin_src elisp :tangle yes
(leaf custom-el
:config
;; Ensure custom writes to specific file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file 'noerror 'nomessage))
#+end_src
#+begin_src elisp :tangle yes
(leaf backup
:config
;; Change the location of file backups/locks into the emacs.d/backups/
(setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups")))))
#+end_src
* Visual Customization
#+begin_src elisp :tangle yes
(leaf visual
:doc "Visual Changes to Emacs"
:tag "builtin" "internal"
:custom ((menu-bar-mode . nil)
(tool-bar-mode . nil)
(scroll-bar-mode . nil))
:custom-face ((default . '((t (:family "JuliaMono"
:height 150
:weight normal)))))
:config (prog1 'visual
;; Set location of custom theme dir
(setq custom-theme-directory (concat user-emacs-directory "themes"))
(load-theme 'UniverseHighContrast)))
#+end_src
* Package Configuration
** Path Preservation
Exec-path-from-shell ensures that path variable is preserved from
shell.
#+begin_src elisp :tangle yes
(leaf exec-path-from-shell :ensure t
:config
(exec-path-from-shell-initialize))
#+end_src
** Font Related
*** Ligature
Font related ligatures, combining multiple characters into "one".
#+begin_src elisp :tangle yes
(leaf ligature
:ensure t
:config
;; Enable the "www" ligature in every possible major mode
(ligature-set-ligatures 't '("www"))
;; Enable traditional ligature support in eww-mode, if the
;; `variable-pitch' face supports it
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
;; Enable all Cascadia Code ligatures in programming modes
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
"\\\\" "://"))
;; Enables ligature checks globally in all buffers. You can also do it
;; per mode with `ligature-mode'.
(global-ligature-mode t))
#+end_src
** Profiling
#+begin_src elisp :tangle yes
(leaf esup :disabled nil :ensure t)
#+end_src
** Version Control
#+begin_src elisp :tangle yes
(leaf magit :ensure t :require t)
#+end_src
** Nix Related
*** Direnv
In order to support direnv (loading =nix-shell= / =nix develop=)
#+begin_src elisp :tangle yes
(leaf direnv
:ensure t
:hook
(direnv-mode))
#+end_src
*** Nix-mode
=.nix= file mode
#+begin_src elisp :tangle yes
(leaf nix-mode :ensure t)
#+end_src
** WEB
We all know the web is the future, obviously, of course.
#+begin_src elisp :tangle yes
(leaf web-mode
:ensure t
:mode
"\\.p?html?\\'"
"\\.djtml\\'"
"\\.jsx?\\'"
"\\.tsx?\\'")
(leaf php-mode
:ensure t)
#+end_src
** D2
#+begin_src elisp :tangle yes
(leaf d2-mode :ensure t)
#+end_src
** YAML
#+begin_src elisp :tangle yes
(leaf yaml-mode :ensure t)
#+end_src
** IDE Like Things
*** Company Completion!
We like autocomplete, it... is nice, okay?
#+begin_src elisp :tangle yes
(leaf company :ensure t
:bind
(("C-<tab>" . company-complete))
:hook after-init-hook
:config (global-company-mode))
#+end_src
*** Language Server Protocol
We love language features that make languages nice
#+begin_src elisp :tangle yes
(leaf lsp-mode
:ensure t
:init
(setq lsp-keymap-prefix "C-c l")
:hook
((dart-mode-hook . lsp)
(python-mode-hook . lsp)
(c-mode-hook . lsp)
(c++-mode-hook . lsp)
(haskell-mode-hook . lsp)
(java-mode-hook . lsp)
(rust-mode-hook . lsp)
;; which key support v v v
(lsp-mode-hook . lsp-enable-which-key-integration))
:commands lsp
:config
(leaf lsp-ui :ensure t
:commands lsp-ui-mode)
(leaf flycheck :ensure t)
(leaf lsp-treemacs :ensure t
:commands lsp-treemacs-errors-list)
(leaf helm-lsp :ensure t
:commands helm-lsp-workspace-symbol)
(leaf dap-mode :ensure t)
(leaf which-key :ensure t
:config (which-key-mode)))
#+end_src
**** Projectile (Projects)
#+begin_src elisp :tangle yes
(leaf projectile
:commands projectile-mode
:config
(projectile-mode +1))
#+end_src
** Python Things
*** Python-mode
Using python-mode is to have more up to date features (and
highlighting) compared to builtin python-mode.
#+begin_src elisp :tangle yes
(leaf python-mode :ensure t
:config
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True"))
#+end_src
*** Poetry
For when we aren't nix'ing things, and want some nice poetry.
#+begin_src elisp :tangle yes
(leaf poetry :ensure t)
#+end_src
** Java
LSP for java is /nice/.
#+begin_src elisp :tangle yes
(leaf lsp-java
:hook (java-mode-hook . lsp))
#+end_src
** C
Who even needs C++, not me, no way, no how.
#+begin_src elisp :tangle yes
(leaf company-ctags :ensure t)
(leaf company-c-headers :ensure t)
(leaf meson-mode :ensure t)
#+end_src
** Haskell
#+begin_src elisp :tangle yes
(leaf haskell-mode :ensure t
:config
(leaf lsp-haskell :ensure t)
(leaf company-ghci :ensure t))
#+end_src
** Rust
#+begin_src elisp :tangle yes
(leaf rust-mode :ensure t)
#+end_src
** Minecraft??
Minecraft =mcfunction= support, because, it can be annoying to type
this stuff otherwise.
#+begin_src elisp :tangle yes
(leaf mcf-mode
:el-get rasensuihei/mcf)
#+end_src
** Lisps
Gonna need to have pretty brackets
#+begin_src elisp :tangle yes
(leaf rainbow-delimiters
:ensure t
:commands rainbow-delimiters-mode
:config
(leaf rainbow
:hook (emacs-lisp-mode-hook . rainbow-delimiters-mode)
(geiser-mode-hook . rainbow-delimiters-mode)))
#+end_src
*** Racket
Makes using racket so much nicer
#+begin_src elisp :tangle yes
(leaf geiser-racket :ensure t)
#+end_src
** Org
We use org-ref because it provides some niceties, like doi-utils for
updating our bibliography.
#+begin_src elisp :tangle yes
(leaf ivy-bibtex :ensure t)
(leaf helm-bibtex :ensure t)
(leaf org-ref :ensure t
:after org
:init
(leaf pdf-tools :ensure t)
:config
:require org-ref org-ref-ivy org-ref-helm doi-utils)
#+end_src
For more export formats we use pandoc:
#+begin_src elisp :tangle yes
(leaf ox-pandoc :ensure t
:after org)
#+end_src
Nicer LaTeX editing (AuCTeX):
#+begin_src elisp :tangle yes
(leaf auctex :ensure t
:after org)
#+end_src
We also ma(k|d)e use of org-tempo for templating things, which can be
nice. Should use the export based templating probably. Eventually.
#+begin_src elisp :tangle yes
(leaf org-cfg
:after org
:require org-ref oc-csl org-tempo ox-latex ox-pandoc
:init
:bind
("C-c ]" . org-ref-insert-link)
("s-[" . org-ref-insert-link-hydra/body)
:hook
(org-mode-hook . auto-fill-mode)
:config
(set-fill-column 100)
(setq org-src-fontify-natively t
org-confirm-babel-evaluate nil
org-src-preserve-indentation t)
(setq bibtex-completion-bibliography
(list (expand-file-name "~/Documents/Bibliography/references.bib")))
(setq org-ref-bibliography-notes "~/Documents/Bibliography/notes.org"
org-ref-default-bibliography '("~/Documents/Bibliography/references.bib")
org-ref-pdf-directory "~/Documents/Bibliography/bibtex-pdfs/")
(setq org-ref-insert-link-function 'org-ref-insert-link-hydra/body
org-ref-insert-cite-function 'org-ref-cite-insert-helm
org-ref-insert-label-function 'org-ref-insert-label-link
org-ref-insert-ref-function 'org-ref-insert-ref-link
org-ref-cite-onclick-function (lambda (_) (org-ref-citation-hydra/body)))
(tempo-define-template "Fig. Caption"
'("" (P "Image: " image t)
(P "Caption: " caption t)
(P "Figure Name: " name t)
"#+CAPTION: " (s caption) > n >
"#+NAME: fig:" (s name) > n >
"#+ATTR_LaTeX: :placement [H]" > n >
"[[" (s image) "]]" > n > p >)
"<fig" "Inserts Figure with Caption")
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-classes
'("labtemplate" "\\documentclass{labtemplate}"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
)
(setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"bibtex %b"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
#+end_src
And in case we want to make some (GNU)?plots?
#+begin_src elisp :tangle yes
(leaf gnuplot
:ensure t)
#+end_src
** Flutter
#+begin_src elisp :tangle yes
(leaf dart-mode :ensure t)
(leaf lsp-dart :ensure t)
#+end_src
** BQN
#+begin_src elisp :tangle yes
(leaf bqn-mode
:el-get "museoa/bqn-mode"
:config
(leaf bqn-font
:after bqn-mode
:config
(set-face-attribute 'bqn-default nil :family 'unspecified)))
#+end_src

View File

@@ -18,7 +18,7 @@
'(font-lock-comment-face ((t (:foreground "#e512ff"))))
'(font-lock-constant-face ((t (:foreground "DeepPink1"))))
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
'(font-lock-function-name-face ((t (:foreground "green"))))
'(font-lock-function-name-face ((t (:foreground "#05fa60"))))
'(font-lock-keyword-face ((t (:foreground "chartreuse"))))
'(font-lock-negation-char-face ((t nil)))
'(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face)))))
@@ -46,6 +46,28 @@
'(next-error ((t (:inherit (region)))))
'(query-replace ((t (:inherit (isearch)))))
'(default ((t (:foreground "white" :background "black" :height 150))))
)
'(company-preview ((t (:background "#000000" :foreground "#ffffff"))))
'(company-preview-common ((t (:inherit company-preview :foreground "#ff00cf"))))
'(company-preview-search ((t (:inherit company-preview :background "black"))))
'(company-scrollbar-bg ((t (:background "grey35"))) t)
'(company-scrollbar-fg ((t (:background "#a22390"))) t)
'(company-template-field ((t (:background "grey75" :foreground "black"))))
'(company-tooltip ((t (:background "#353535" :foreground "white"))))
'(company-tooltip-common ((t (:foreground "magenta"))))
'(company-tooltip-mouse ((t (:inherit company-tooltip-selection))))
'(company-tooltip-scrollbar-thumb ((t (:background "#a22390"))))
'(company-tooltip-scrollbar-track ((t (:background "grey35"))))
'(company-tooltip-search ((t (:inherit company-tooltip-selection))))
'(company-tooltip-search-selection ((t (:inherit company-tooltip-selection))))
'(company-tooltip-selection ((t (:background "#4584a2" :foreground "white"))))
'(elpy-codecell-boundary ((t (:background "#333"))))
'(rainbow-delimiters-depth-1-face ((t (:foreground "#69f"))))
'(rainbow-delimiters-depth-2-face ((t (:foreground "#39b"))))
'(rainbow-delimiters-depth-3-face ((t (:foreground "#278"))))
'(rainbow-delimiters-depth-4-face ((t (:foreground "#281"))))
'(rainbow-delimiters-depth-5-face ((t (:foreground "#047"))))
'(rainbow-delimiters-depth-6-face ((t (:foreground "#138"))))
'(rainbow-delimiters-depth-7-face ((t (:foreground "#708"))))
'(rainbow-delimiters-depth-8-face ((t (:foreground "#920")))))
(provide-theme 'UniverseHighContrast)