Compare commits

..

39 Commits

Author SHA1 Message Date
252220fdad Remove <LAB Template 2023-08-16 20:55:21 -04:00
73f27e8489 Tangle & Cleanup 2023-08-16 20:37:50 -04:00
feceb5a6a1 Flake ++ Org Config 2023-08-15 23:17:52 -04:00
20f5f6df80 config changes 2023-08-14 20:56:28 -04:00
2bb2424b17 D2 Mode 2023-07-27 13:30:01 -04:00
59214f382e Cleanup org And Flutter 2023-07-27 13:29:27 -04:00
David Crompton
a177bd14ba Add Python Poetry 2023-07-27 13:29:27 -04:00
0b9e6d71ff Yaml, Meson, Verilog and VHDL 2023-07-09 19:04:19 -04:00
c35c1e721b Python Mode 2023-03-03 22:35:37 -05:00
David Crompton
c0754fcec3 Rust lsp hook 2023-03-03 22:32:57 -05:00
a0a3172b45 Remove Extra ) 2023-01-25 13:52:34 -05:00
c5ac8af131 Fix Custom.el Conflicts 2023-01-25 13:23:24 -05:00
1ad69146b2 Flyspell: Aspell 2023-01-25 13:21:04 -05:00
8ab7c1a189 Git ignore and latex preview 2023-01-25 13:20:30 -05:00
7dcdcdf004 Changes bb 2023-01-25 13:18:38 -05:00
2aae25db0a Merge remote-tracking branch 'origin/master' 2022-12-05 10:54:36 -05:00
a69b6427f8 Add ligature support
Disabled prof perf'ing
2022-12-05 10:52:48 -05:00
278d9b3a2f Remove Unused pyvenv. Change Default Interpreter 2022-12-05 10:20:08 -05:00
cfa06c8959 Actually fix Julia 2022-12-02 13:44:05 -05:00
ea60c769ca Fix JuliaFont on mac 2022-12-02 13:42:42 -05:00
b1b673902d BQN Use Default Font 2022-12-02 13:40:50 -05:00
6c7ef5e02d Update Font to JuliaMono 2022-12-02 12:44:21 -05:00
aea8043228 BQN 2022-12-01 21:59:33 -05:00
031854d2a8 Java lsp 2022-12-01 20:59:30 -05:00
562203cb48 Minecraft mcFunction support 2022-11-06 13:13:02 -05:00
2da0b9c9dd Add Rust 2022-11-04 13:27:59 -04:00
2d8a554bc1 Revert "Org: Removed Pandoc Export"
This reverts commit c1eaf539e6.
2022-08-17 09:54:22 -04:00
c1eaf539e6 Org: Removed Pandoc Export 2022-08-17 09:50:30 -04:00
3c0ded9423 Fix conflicts between laptop and Desktop 2022-07-24 15:47:16 -04:00
a806b67e42 DOI utils 2022-07-24 15:42:02 -04:00
2d0fd4d95d Add nix and version control 2022-07-24 15:37:35 -04:00
a41b23d608 Fix org mode 2022-07-21 18:27:19 -04:00
b90c5978b5 Ignore elpa 2022-07-21 18:04:15 -04:00
46947ce091 Haskell Update 2022-02-05 14:45:34 -05:00
edb16c3e70 Fixed Python env 2022-01-13 17:09:48 -05:00
4fdaba64cb Fix hoc mode slightly, and add more hooks to python and org mode 2021-11-24 15:36:39 -05:00
926d268ba8 hoc-mode update 2021-10-03 18:57:34 -04:00
2e0f092206 LSP & Hoc mode 2021-09-25 16:01:58 -04:00
dc4e0cee30 Elpy Setup, Racket & Neuron 2021-09-24 09:32:20 -04:00
9 changed files with 571 additions and 865 deletions

8
.gitignore vendored
View File

@@ -1,8 +1,7 @@
/auto-save-list/ /auto-save-list/
/backups/ /backups/
/etc/ /etc/
/straight/* /straight/
!/straight/versions
/tutorial/ /tutorial/
/var/ /var/
tramp tramp
@@ -15,8 +14,3 @@ tramp
/result /result
/transient/ /transient/
/BROWSE /BROWSE
org-roam.db
bookmarks
.org-id-locations
.lsp-session-v1
.dap-breakpoints

161
custom.el
View File

@@ -3,10 +3,169 @@
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(conda-anaconda-home "~/opt/anaconda3")
'(custom-safe-themes '(custom-safe-themes
'("5f79df6b4c56021d173c178d90b5a600c678a192d78cc639553915985b67c4ea" "8cda1cfae8e393bfb23f1d448d4be10720835d086f7db080908a7c8d01566516" "a27f7b52fe66bacaec9059f8afd04d055a4ac3c2fba9eb9128c81e10152fc566" "1ba7196d8e7b883272ea8818a5163aec21b57023368febf55255816226f7b370" "8256e7e03444834d34915a226dc24933b0d680a0a1da568ec03f852be776f168" "4ac2f45e6b46e5bb50826d4250df71a57124169b82cc0ad75e436de6e70a9690" "29addd67feb95ca1179e60d476bb92c1f11835548e2efaec15c9ac6af2a8e6a8" "9b7a425c38c4894e161887c26381c2a6fc1de3c1407158507caaf469d76eb27b" "bce055e1681dd343659957710af77f7a6ad106677d42c61f86ebeedf637c4493" "f62c69472d3f506179d797131c014fe4095d9609dddf14542c50e0388f1e8d6d" "cf143bf23fa8160f87331893cdadc40b876556634621dfa373fcf93c4c97c444" "f459dfd377e9cb98d90e53383dcca7d73396cc0a22b31d39af24fb1cf3548fb5" "fcc14e1a22c99d77f7b1455b0c8a320f8afd0c1f4a9c5c50b45f676eb0c54ba2" "a6bae299481c3c0058e611d2c32ca169fa27203345a880806a5a8554cdd2e588" "feb9556e03558588e29e6659c8e01ea3d2a17a1e7a13e9bf9fc9e59cacba4b72" default)) '("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 '(package-selected-packages
'(sage-shell-mode ess lsp-dart dart-mode org-roam-bibtex org-roam-ui org-roam gnuplot auctex ox-reveal ox-pandoc pdf-tools helm-bibtex org-ref org geiser-racket rainbow-delimiters slint-mode rust-mode company-ghci lsp-haskell haskell-mode poetry python-mode yaml-mode d2-mode php-mode web-mode dap-mode flycheck lsp-ui lsp-mode company which-key nix-mode direnv magit exec-path-from-shell esup gcmh transient-dwim leaf-convert leaf-tree blackout hydra el-get leaf-keywords))) '(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
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

86
flake.lock generated
View File

@@ -1,15 +1,55 @@
{ {
"nodes": { "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1689068808,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "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" "type": "github"
}, },
"original": { "original": {
@@ -20,11 +60,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737746512, "lastModified": 1691990649,
"narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=", "narHash": "sha256-gMbKOiX1HwClRP9lADaaV/lnZr93NEaOFe4ApDx/zd8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "825479c345a7f806485b7f00dbe3abb50641b083", "rev": "6e287913f7b1ef537c97aa301b67c34ea46b640f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -34,9 +74,26 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
}, },
@@ -54,6 +111,21 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View File

@@ -1,21 +1,23 @@
{ {
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 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"; inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: let outputs = { self, nixpkgs, flake-utils, emacs-overlay }:
in (flake-utils.lib.eachDefaultSystem (system: let flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [
emacs-overlay.overlays.default
];
}; };
in { in {
packages = { packages = {
me-emacs = pkgs.emacs; emacs = pkgs.emacsWithPackagesFromUsePackage {
me-emacs-wayland = pkgs.emacs-pgtk; config = ./main.org;
package = pkgs.emacs29;
};
}; };
})) // {
overlays.default = final: prev: ({
me-emacs = final.emacs;
me-emacs-wayland = final.emacs-pgtk;
}); });
};
} }

39
init.el
View File

@@ -3,32 +3,23 @@
;; This file loads Org and then loads the rest of our Emacs initialization from Emacs lisp ;; This file loads Org and then loads the rest of our Emacs initialization from Emacs lisp
;; embedded in literate Org files. ;; embedded in literate Org files.
(setq straight-check-for-modifications '(check-on-save find-when-checking)) ;; Load up Org Mode and (now included) Org Babel for elisp embedded in Org Mode files
(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))
(setq straight-vc-git-default-clone-depth '(1 single-branch)) ;; instead of the default 'full
;; prebuild is broken in org-mode (TODO: FIX)
;; (straight-override-recipe '(org :local-repo "/Users/universelaptop/tmp/org"))
(straight-use-package 'org)
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name))) (setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(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))
;; load up all literate org-mode files in this directory ;; load up all literate org-mode files in this directory
(mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$")) (mapc #'org-babel-load-file (directory-files dotfiles-dir t "\\.org$"))

843
main.org
View File

@@ -7,137 +7,62 @@
#+author: #+author:
#+language: en #+language: en
* Initialization * Intialization
** Straight.el
Package management to be a little more fien/precise and work outside
of Nix (as much as it would be nice to work inside of Nix too). This
is actually contained within =init.el=
#+begin_src elisp :tangle no :exports code
(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
This code block actually resides in init.el (so that we can perform
some necessary pre-configuration)
** Leaf.el
We must initialize =leaf.el=, which we use as a use-package We must initialize =leaf.el=, which we use as a use-package
replacement for defining configs and relations between packages etc. replacement for defining configs for different things.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
;; <leaf-install-code>
(eval-and-compile (eval-and-compile
(straight-use-package 'leaf) (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 (leaf leaf-keywords
:ensure t
:init :init
(straight-use-package 'leaf-keywords) (leaf el-get :ensure t)
:custom (leaf hydra :ensure t)
(leaf-alias-keyword-alist .'((:ensure . :straight))) (leaf blackout :ensure t)
:config :config
;; initialize leaf-keywords.el ;; initialize leaf-keywords.el
(leaf-keywords-init))) (leaf-keywords-init)))
;; </leaf-install-code>
(leaf leaf-tree :ensure t) (leaf leaf-tree :ensure t)
(leaf leaf-convert :ensure t) (leaf leaf-convert :ensure t)
(leaf transient-dwim :ensure t (leaf transient-dwim
:require t ;; Needed so that org-roam may unobstructively depend on this :ensure t
:bind (("M-=" . transient-dwim-dispatch))) :bind (("M-=" . transient-dwim-dispatch)))
#+end_src #+end_src
** MacOS Specific #+begin_src elisp :tangle yes
#+begin_src elisp :tangle yes :exports code
(leaf macos
:hook (after-init hook)
:when (eq system-type 'darwin)
:init
(setq mac-option-modifier 'meta))
#+end_src
** Performance
*** Garbage Collection
This makes the garbage collection thresholds variable based on emacs
usage. I don't know how well this plays with LSPs or similarly RAM hungry
features. This was useful when I used a very restricted netbook w/ ~2GiB of
RAM.
Disabled for now. (May add flags to enable on specific systems)
#+begin_src elisp :tangle yes :exports code
; (leaf gcmh :ensure t
; :hook (after-init-hook))
#+end_src
*** Profiling
#+begin_src elisp :tangle yes :exports code
(leaf esup :disabled nil :ensure t)
#+end_src
** Emacs Paths
*** Custom.el
Ensure that the =custom.el= resides in the users' emacs directory.
#+begin_src elisp :tangle yes :exports code
(leaf custom-el (leaf custom-el
:leaf-defer nil
:config :config
;; Ensure custom writes to specific file ;; Ensure custom writes to specific file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(load custom-file 'noerror 'nomessage)) (load custom-file 'noerror 'nomessage))
#+end_src #+end_src
*** Backups #+begin_src elisp :tangle yes
Set the backups directory to reside in the users' emacs directory.
#+begin_src elisp :tangle yes :exports code
(leaf backup (leaf backup
:leaf-defer nil
:config :config
;; Change the location of file backups/locks into the emacs.d/backups/ ;; Change the location of file backups/locks into the emacs.d/backups/
(setq backup-directory-alist (setq backup-directory-alist
`(("." . ,(concat user-emacs-directory "backups"))))) `(("." . ,(concat user-emacs-directory "backups")))))
#+end_src #+end_src
** Shell Path Preservation
Exec-path-from-shell ensures that path variable is preserved from
shell.
#+begin_src elisp :tangle yes :exports code
(leaf exec-path-from-shell :ensure t
:config
(exec-path-from-shell-initialize))
#+end_src
* Visual Customization * Visual Customization
Visual Theme of Emacs config: defined in the =themes= directory. #+begin_src elisp :tangle yes
#+begin_src elisp :tangle yes :exports code
(leaf visual (leaf visual
:leaf-defer nil
:doc "Visual Changes to Emacs" :doc "Visual Changes to Emacs"
:tag "builtin" "internal" :tag "builtin" "internal"
:custom ((menu-bar-mode . nil) :custom ((menu-bar-mode . nil)
@@ -146,161 +71,93 @@ Visual Theme of Emacs config: defined in the =themes= directory.
:custom-face ((default . '((t (:family "JuliaMono" :custom-face ((default . '((t (:family "JuliaMono"
:height 150 :height 150
:weight normal))))) :weight normal)))))
:config :config (prog1 'visual
;; Set location of custom theme dir ;; Set location of custom theme dir
(setq custom-theme-directory (concat user-emacs-directory "themes")) (setq custom-theme-directory (concat user-emacs-directory "themes"))
(load-theme 'UniverseHighContrast)) (load-theme 'UniverseHighContrast)))
#+end_src #+end_src
* Version Control * Package Configuration
#+begin_src elisp :tangle yes :exports code
(leaf magit ** Path Preservation
:leaf-defer nil
:ensure t :require t) 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 #+end_src
* Nix Related ** Font Related
** Direnv *** 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=) In order to support direnv (loading =nix-shell= / =nix develop=)
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf direnv (leaf direnv
:ensure t :ensure t
:global-minor-mode direnv-mode) :hook
(direnv-mode))
#+end_src #+end_src
** Nix-mode *** Nix-mode
=.nix= file mode =.nix= file mode
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf nix-mode (leaf nix-mode :ensure t)
:ensure t
:mode "\\.nix\\'")
#+end_src #+end_src
* IDE Like Things ** WEB
** Which Key Again?
#+begin_src elisp :tangle yes :exports code
(leaf which-key
:ensure t
:global-minor-mode which-key-mode)
#+end_src
** Company Completion!
We like autocomplete, it... is nice, okay?
#+begin_src elisp :tangle yes :exports code
(leaf company :ensure t
:bind
(("C-<tab>" . company-complete))
:hook after-init-hook
:global-minor-mode global-company-mode)
#+end_src
** Language Server Protocol
We love language features that make languages nice
#+begin_src elisp :tangle yes :exports code
(leaf lsp-mode
:ensure t
:init
(setq lsp-keymap-prefix "C-c l")
:commands lsp lsp-deferred
:hook (
;; which key support v v v
(lsp-mode-hook . lsp-enable-which-key-integration)
#+end_src
*** IDE Languages
**** Dart/Flutter
#+begin_src elisp :tangle yes :exports code
(dart-mode . lsp-deferred)
#+end_src
**** Python
#+begin_src elisp :tangle yes :exports code
(python-mode . lsp-deferred)
#+end_src
**** C/C++
#+begin_src elisp :tangle yes :exports code
(c-mode-hook . lsp-deferred)
(c++-mode-hook . lsp-deferred)
#+end_src
**** Haskell
#+begin_src elisp :tangle yes :exports code
(haskell-mode-hook . lsp-deferred)
#+end_src
**** Java
#+begin_src elisp :tangle yes :exports code
(java-mode-hook . lsp-deferred)
#+end_src
**** Rust
#+begin_src elisp :tangle yes :exports code
(rust-mode-hook . lsp-deferred)
#+end_src
#+begin_src elisp :tangle yes :exports code
)
#+end_src
*** LSP Plugins:
We do want some nice to haves of course
#+begin_src elisp :tangle yes :exports code
:init
#+end_src
- A pretty UI:
#+begin_src elisp :tangle yes :exports code
(leaf lsp-ui :ensure t
:commands lsp-ui-mode)
#+end_src
- Flycheck compat:
#+begin_src elisp :tangle yes :exports code
(leaf flycheck :ensure t)
#+end_src
- Debugger Compatibility
#+begin_src elisp :tangle yes :exports code
(leaf dap-mode :ensure t)
#+end_src
*** Projectile (Projects)
#+begin_src elisp :tangle yes :exports code
(leaf projectile
:commands projectile-mode
:config
(projectile-mode +1))
#+end_src
END LSP CONFIG
#+begin_src elisp :tangle yes :exports code
)
#+end_src
* WEB
We all know the web is the future, obviously, of course. We all know the web is the future, obviously, of course.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf web-mode (leaf web-mode
:ensure t :ensure t
:mode :mode
@@ -309,104 +166,128 @@ We all know the web is the future, obviously, of course.
"\\.jsx?\\'" "\\.jsx?\\'"
"\\.tsx?\\'") "\\.tsx?\\'")
(leaf php-mode (leaf php-mode
:mode "\\.php\\'"
:ensure t)
(leaf rainbow-mode
:leaf-defer nil
:ensure t) :ensure t)
#+end_src #+end_src
* D2 ** D2
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf d2-mode (leaf d2-mode :ensure t)
:ensure t
:mode "\\.d2\\'"
)
#+end_src #+end_src
* YAML ** YAML
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf yaml-mode (leaf yaml-mode :ensure t)
:ensure t
:mode "\\.yaml\\'"
)
#+end_src #+end_src
* Python Things ** IDE Like Things
*** Company Completion!
** Python-mode 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 Using python-mode is to have more up to date features (and
highlighting) compared to builtin python-mode. highlighting) compared to builtin python-mode.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf python-mode (leaf python-mode :ensure t
:ensure t
:mode "\\.py\\'"
:config :config
(setq python-shell-interpreter "ipython" (setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True")) python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True"))
#+end_src #+end_src
*** Poetry
** Poetry
For when we aren't nix'ing things, and want some nice poetry. For when we aren't nix'ing things, and want some nice poetry.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf poetry :ensure t) (leaf poetry :ensure t)
#+end_src #+end_src
** Java
* C LSP for java is /nice/.
Who even needs C++, not me, no way, no how. #+begin_src elisp :tangle yes
(leaf lsp-java
#+begin_src elisp :tangle no :exports code :hook (java-mode-hook . lsp))
(leaf c-config
:config
; (leaf company-ctags :ensure t
; :hook c-mode-hook c++-mode-hook)
; (leaf company-c-headers :ensure t
; :hook c-mode-hook c++-mode-hook)
; (leaf meson-mode :ensure t
; :hook c-mode-hook c++-mode-hook)
)
#+end_src #+end_src
** C
* Haskell Who even needs C++, not me, no way, no how.
#+begin_src elisp :tangle yes
#+begin_src elisp :tangle yes :exports code (leaf company-ctags :ensure t)
(leaf haskell-mode (leaf company-c-headers :ensure t)
:ensure t (leaf meson-mode :ensure t)
:mode "\\.hs\\'" #+end_src
:init ** Haskell
#+begin_src elisp :tangle yes
(leaf haskell-mode :ensure t
:config
(leaf lsp-haskell :ensure t) (leaf lsp-haskell :ensure t)
(leaf company-ghci :ensure t)) (leaf company-ghci :ensure t))
#+end_src #+end_src
** Rust
* Rust #+begin_src elisp :tangle yes
(leaf rust-mode :ensure t)
#+begin_src elisp :tangle yes :exports code
(leaf rust-mode :ensure t
:mode "\\.rs\\'"
:init
(leaf slint-mode :ensure t))
#+end_src #+end_src
** Minecraft??
* Minecraft??
Minecraft =mcfunction= support, because, it can be annoying to type Minecraft =mcfunction= support, because, it can be annoying to type
this stuff otherwise. this stuff otherwise.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf mcf-mode (leaf mcf-mode
:straight (mcf-mode :type git :host github :repo "rasensuihei/mcf")) :el-get rasensuihei/mcf)
#+end_src #+end_src
** Lisps
* Lisps
Gonna need to have pretty brackets Gonna need to have pretty brackets
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf rainbow-delimiters (leaf rainbow-delimiters
:ensure t :ensure t
:commands rainbow-delimiters-mode :commands rainbow-delimiters-mode
@@ -415,179 +296,37 @@ Gonna need to have pretty brackets
:hook (emacs-lisp-mode-hook . rainbow-delimiters-mode) :hook (emacs-lisp-mode-hook . rainbow-delimiters-mode)
(geiser-mode-hook . rainbow-delimiters-mode))) (geiser-mode-hook . rainbow-delimiters-mode)))
#+end_src #+end_src
*** Racket
** Racket
Makes using racket so much nicer Makes using racket so much nicer
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf geiser-racket :ensure t) (leaf geiser-racket :ensure t)
#+end_src #+end_src
** Org
** Clojure
For using clojure, we use both [[https://github.com/clojure-emacs/clojure-mode][clojure-mode]] and for REPL we use [[https://github.com/clojure-emacs/cider][CIDER]].
#+begin_src elisp :tangle yes :exports code
(leaf clojure-mode :ensure t cider)
#+end_src
* Org
We ensure that org is available (though it is builtin)
For Version compatibility we actually install org in init.el (to not
conflict with the builtin version of Org)
#+begin_src elisp :tangle yes :exports code
(leaf org
:require t org-tempo
:hook
(org-mode-hook . auto-fill-mode)
:config
(setq document-dir (expand-file-name (if (eq system-type 'darwin) "~/Nextcloud" "~/Documents")))
(setq org-directory (concat document-dir "/org"))
(when (not (file-exists-p org-directory)) (mkdir org-directory))
(set-fill-column 100)
(setq org-src-fontify-natively t
org-confirm-babel-evaluate nil
org-src-preserve-indentation t))
;; (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"))
#+end_src
We also want to set our document directory (which as it stands is OS
dependent)
** Citations/References
We use org-ref because it provides some niceties, like doi-utils for We use org-ref because it provides some niceties, like doi-utils for
updating our bibliography. updating our bibliography.
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf org-ref :ensure t helm-bibtex pdf-tools (leaf ivy-bibtex :ensure t)
(leaf helm-bibtex :ensure t)
(leaf org-ref :ensure t
:after org :after org
:bind* :init
("C-c ]" . org-ref-insert-link) (leaf pdf-tools :ensure t)
:config :config
(setq org-bib-dir (concat document-dir "/Bibliography")) :require org-ref org-ref-ivy org-ref-helm doi-utils)
(setq org-bib-file (concat org-bib-dir "/references.bib"))
;; Where should PDFs be stored
(setq bibtex-completion-library-path `(,(concat org-bib-dir "/bibtex-pdfs/"))
;; Where is the bibliography expected (org-ref & org-cite)
bibtex-completion-bibliography (list org-bib-file)
org-cite-global-bibliography (list org-bib-file)
bibtex-completion-notes-path (concat org-bib-dir "/notes")
bibtex-completion-notes-template-multiple-files "* ${author-or-editor}, ${title}, ${journal}, (${year}) :${=type=}: \n\nSee [[cite:&${=key=}]]\n"
bibtex-completion-additional-search-fields '(keywords)
bibtex-completion-display-formats
'((article . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} ${journal:40}")
(inbook . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} Chapter ${chapter:32}")
(incollection . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
(inproceedings . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
(t . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*}"))
bibtex-completion-pdf-open-function
(lambda (fpath)
(call-process "open" nil 0 nil fpath)))
;; For bibtex generated keys (in-org citation format)
(setq bibtex-autokey-year-length 4
bibtex-autokey-name-year-separator "-"
bibtex-autokey-year-title-separator "-"
bibtex-autokey-titleword-separator "-"
bibtex-autokey-titlewords 2
bibtex-autokey-titlewords-stretch 1
bibtex-autokey-titleword-length 5)
(add-to-list 'org-export-before-parsing-functions 'org-ref-csl-preprocess-buffer)
(add-to-list 'org-export-before-parsing-functions 'org-ref-refproc)
:require org-ref org-ref-helm oc-bibtex oc-bibtex oc-csl oc-natbib org-ref-refproc)
#+end_src #+end_src
** Extra Export Options
*** LaTeX (Obviously)
We really do require latex
#+begin_src elisp :tangle yes :exports code
(leaf ox-latex :require t
:after org
:config
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(setq org-latex-prefer-user-labels t)
(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}")))
(add-to-list 'org-latex-classes
'("thesis" "\\documentclass[11pt]{ut-thesis}"
("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
#+end_src
*** HTML Export
#+begin_src elisp :tangle yes :exports code
(leaf ox-html
:after org
:config
(setq org-html-head "
<style type=\"text/css\">
pre.src {
background-color: #000;
color: #ccc;
border-radius: 2ch;
}
pre.src:before {
background-color: #ccc;
color: #000;
border-radius: 0.5ch;
}
</style>
"))
#+end_src
*** Pandoc the Panacea of Exports
For more export formats we use pandoc: For more export formats we use pandoc:
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf ox-pandoc :ensure t :require t (leaf ox-pandoc :ensure t
:after org) :after org)
#+end_src #+end_src
*** Slideshows
**** Web based (reveal)
Writing mockup presentations can be quicker when you focus on the text
of the presentation first, and prettifying later. Reveal.js is a nice
in between of these.
#+begin_src elisp :tangle yes :exports code
(leaf ox-reveal :ensure t :require t
:config
(setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js"))
#+end_src
** LaTeX: with AuCTeX
Nicer LaTeX editing (AuCTeX): Nicer LaTeX editing (AuCTeX):
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf auctex :ensure t (leaf auctex :ensure t
:after org) :after org)
#+end_src #+end_src
@@ -595,149 +334,81 @@ Nicer LaTeX editing (AuCTeX):
We also ma(k|d)e use of org-tempo for templating things, which can be 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. 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? And in case we want to make some (GNU)?plots?
#+begin_src elisp :tangle yes :exports code #+begin_src elisp :tangle yes
(leaf gnuplot (leaf gnuplot
:ensure t) :ensure t)
#+end_src #+end_src
** Flutter
** Org Mode Agenda/Calendar Things #+begin_src elisp :tangle yes
*** Agenda Location
Make it so that all files in the " src_elisp{org-agenda-files} " variable (e.g. "=~/Documents=") will be
included in the tablutation and collation of all the dates and todos
etc.
#+begin_src elisp :tangle yes :exports code
(leaf org-agenda
:after org
:config
(setq org-agenda-files `(,(concat org-directory))))
#+end_src
*** Capture Things
Unless specified otherwise, any captured note, date, meeting, idea,
should be put into the src_elisp{org-directory}.
Similarly, we have a default file for notes that we capture, in there
=note.org=, which is where all captured things go when they aren't
told to go elsewhere.
#+begin_src elisp :tangle yes :exports code
(leaf org-capture
:after org
:config
(setq org-default-notes-file (concat org-directory "/notes.org")))
#+end_src
We also want to configure what type of things we want to capture,
e.g. meetings, deadlines and whatever else:
#+begin_src elisp :tangle yes :exports code
(leaf org-capture
:after org-capture
:config
(add-hook 'org-capture-mode-hook #'org-id-get-create)
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "todos.org" "Tasks")
"* TODO %^{Todo?} %^G\nSCHEDULED: %^t\n:PROPERTIES:\n:ADDED: %U\n:END:\n %i\n %a \n%?\n")
("h" "Habit" entry (file+headline "todos.org" "Habits")
"* TODO %^{Habit} %^G\nSCHEDULED: %^T\n:PROPERTIES:\n:STYLE: habit\n:ADDED: %U\n:END:\n%?\n")
("j" "Journal" entry (file+datetree "journal.org")
"* %^{Journal Entry:} %^G\nEntered on %U\n %i\n:PROPERTIES:\n:ADDED: %U\n:END:\n %a\n%?\n")
("m" "Meeting" entry (file+headline "dates.org" "Meetings")
"* %^{Meeting Title:} %^G\nSCHEDULED: %^t\n:PROPERTIES:\n:CATEGORY: Meeting\n:LOCATION: %^{LOCATION}\n:ADDED: %U\n:END:\n%?\n"))))
#+end_src
*** Habits
#+begin_src elisp :tangle yes :exports code
(leaf org-habit
:after org
:require t
:config
(add-to-list 'org-modules 'org-habit t)
(setq org-habit-graph-column 80))
#+end_src
*** Org Mobile
So that we can edit and view things on the go. We could use the proper =org-mobile= module of org,
instead we synchronize w/ Nextcloud, as to have it be the format we like when using =Orgzly Revived=
** Org Notes (Roam)
Let alone being able to maintain dates and times and journal entries: having notes for consolidating
a personal wiki (separately) is also rather useful. For this we use Org-roam, a slip-note style note
taking package.
*** Org Roam
#+begin_src elisp :tangle yes :exports code
(leaf org-roam :ensure t
:after org transient-dwim
:require t
:config
(setq org-roam-directory (file-truename org-directory))
(org-roam-db-autosync-mode)
(transient-define-prefix transient--org-roam ()
["Org Roam"
("M-c" "Capture Note" org-roam-capture)
("M-i" "Insert Note" org-roam-node-insert)
("M-f" "Find Note" org-roam-node-find)])
(transient-append-suffix 'transient-dwim-org "M-o" '("M-n" "roam" transient--org-roam))
(setq org-roam-capture-templates
'(("d" "default" plain "%?"
:target (file+head "notes/%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n")
:unnarrowed t))))
#+end_src
**** Org Roam UI
#+begin_src elisp :tangle yes :exports code
(leaf org-roam-ui :ensure t
:after org-roam)
#+end_src
**** Org Roam Bibtex (ORB)
#+begin_src elisp :tangle yes :exports code
(leaf org-roam-bibtex :ensure t
:after org-roam org-ref
:require t
:hook (after-init-hook . org-roam-bibtex-mode))
#+end_src
** Org Babel
#+begin_src elisp :tangle yes :exports code
(leaf org-babel
:after org
:config
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(shell . t))))
#+end_src
* Flutter
#+begin_src elisp :tangle yes :exports code
(leaf dart-mode :ensure t) (leaf dart-mode :ensure t)
(leaf lsp-dart :ensure t) (leaf lsp-dart :ensure t)
#+end_src #+end_src
** BQN
* BQN #+begin_src elisp :tangle yes
#+begin_src elisp :tangle yes :exports code
(leaf bqn-mode (leaf bqn-mode
:ensure (bqn-mode :type git :host github :repo "museoa/bqn-mode") :el-get "museoa/bqn-mode"
:defer-config :config
(set-face-attribute 'bqn-default nil :family 'unspecified)) (leaf bqn-font
:after bqn-mode
:config
(set-face-attribute 'bqn-default nil :family 'unspecified)))
#+end_src #+end_src

View File

@@ -1,79 +0,0 @@
(defvar nmodl-mode-hook nil)
(defvar wpdl-mode-map
(let ((map (make-keymap)))
; (define-key map "\C-j" 'newline-and-indent)
map)
"Keymap for NMODL major mode")
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.mod\\'" . nmodl-mode))
(setq nmodl-keywords
'(
"NEURON"
"UNITS"
"PARAMETER"
"ASSIGNED"
"STATE"
"INITIAL"
"BREAKPOINT"
"DERIVATIVE"
"PROCEDURE"
))
(setq nmodl-neuron-keywords
'(
"TITLE"
"SUFFIX"
"POINT_PROCESS"
"RANGE"
"GLOBAL"
"POINTER"
"BBCOREPOINTER"
"USEION"
"NONSPECIFIC_CURRENT"
"SOLVE"
"METHOD"
))
(defvar nmodl-font-lock-keywords
`(
,(regexp-opt nmodl-keywords t) . 'font-lock-keyword-face
)
"Minimal highlighting expressions for NMODL mode")
(setq nmodl-font-lock-keywords
`(
(,(regexp-opt nmodl-keywords t) . 'font-lock-keyword-face)
(,(regexp-opt nmodl-neuron-keywords t) . 'font-lock-constant-face)
("^[[:space:]]*\\([[:alpha:]][[:alnum:]_]*\\)" . 'font-lock-variable-name-face)
))
(setq nmodl-syntax-rules
(syntax-propertize-rules
("TITLE\\([^\n]\\)[^\n]*\\(\n\\)" (1 "|") (2 "|"))
("\\<\\(COMMENT\\)\\>" (1 "<"))
("\\<ENDCOMMEN\\(T\\)\\>" (1 ">"))
("^[^:\n]*\\(:\\)[^\n]*\\(\n\\)" (1 "!") (2 "!"))
("\\({\\)" (1 "("))
("\\(}\\)" (1 ")"))
))
(defun nmodl-indent ()
(indent-relative-first-indent-point)
)
(defun nmodl-mode ()
"Major mode for editing Workflow Process Description Language files"
(interactive)
(kill-all-local-variables)
(setq-local font-lock-defaults '(nmodl-font-lock-keywords))
(setq-local syntax-propertize-function nmodl-syntax-rules)
(setq-local c-syntactic-indentation t)
(setq-local indent-line-function 'nmodl-indent)
;; (use-local-map wpdl-mode-map)
(setq major-mode 'nmodl-mode)
(setq mode-name "NMODL")
(run-hooks 'nmodl-mode-hook))

View File

@@ -1,104 +0,0 @@
(("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196")
("auctex" . "a2809e4d7068aaa7fa9cbd51214606393d4ab9eb")
("avy" . "933d1f36cca0f71e4acb5fac707e9ae26c536264")
("biblio.el" . "bb9d6b4b962fb2a4e965d27888268b66d868766b")
("bqn-mode" . "a253194d880e762a2886feac4745ae9cf967567b")
("bui.el" . "f3a137628e112a91910fd33c0cff0948fa58d470")
("cfrs" . "981bddb3fb9fd9c58aed182e352975bd10ad74c8")
("cider" . "8a4405ca0d8dd02d1f35e287131838feec2a81c6")
("citeproc-el" . "f5217b9fdbcb41a0381ecf92108390fc843090dd")
("clojure-mode" . "28dc02114ae70db6bb68d537ea77985f272120bc")
("company-ghci" . "a1d25652583ab4666c5a78cac18cd8039776b50d")
("company-mode" . "ca045bc54411f274779057d94a1807efe7f8d2a6")
("compat" . "97f24af413a38a7f1aaedb29f5aaaa333796a5b4")
("d2-mode" . "e1fc7d6c1915acaf476060c0f79b8bdef6bd1952")
("dap-mode" . "c81014ccc390e8994b061bd2d9f8b5dd84498a3d")
("dart-mode" . "edb45cb7095b1e4f62eaae33e56fe9af5b010213")
("dash.el" . "af5ea5d8a13735fa27d2c3e6f756d065639a7b45")
("el-get" . "8d3edab760ff84baf4ce36c0b33bfb8668c6d212")
("eldoc" . "5cba6bcbd3b3d3f1ae9668cf6a1f9e2d3ebb10df")
("emacs-async" . "59f6ee68eb9bed8de12d71ca78a11dd8effbc2aa")
("emacs-direnv" . "c0bf3b81c7a97e2a0d06d05495e86848254fcc1f")
("emacs-htmlize" . "c9a8196a59973fabb3763b28069af9a4822a5260")
("emacs-request" . "c22e3c23a6dd90f64be536e176ea0ed6113a5ba6")
("emacs-web-server" . "3982c55e9061475038a3ccd61aecb2de3d407cec")
("emacs-websocket" . "40c208eaab99999d7c1e4bea883648da24c03be3")
("emacs-which-key" . "38d4308d1143b61e4004b6e7a940686784e51500")
("emacsmirror-mirror" . "dc1c32049771890965c0d498be5cced13a65296a")
("emacsql" . "bc6713fb763388f43111ba1488df9263d5dc505b")
("eros" . "a9a92bdc6be0521a6a06eb464be55ed61946639c")
("esup" . "4b49c8d599d4cc0fbf994e9e54a9c78e5ab62a5f")
("exec-path-from-shell" . "4896a797252fbfdac32fb77508500ac7d220f717")
("f.el" . "931b6d0667fe03e7bf1c6c282d6d8d7006143c52")
("flycheck" . "8c0dbfaa463e69efb41ef2cda9c4e89b99e266a0")
("geiser" . "c8b862f00e208f2c09bf2a2b2436af0a466a2531")
("gnu-elpa-mirror" . "4809077cd69544e81d946c7bb64c3d7e33e24ff1")
("gnuplot" . "43e9674b869475b1c2a32f045c167673eb2faae0")
("haskell-mode" . "e5d32021ea30438fb957976760b94af66a55b53b")
("helm" . "c8d147be4d89cb3355b89a645ba3703a46bad15d")
("helm-bibtex" . "6064e8625b2958f34d6d40312903a85c173b5261")
("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef")
("hydra" . "59a2a45a35027948476d1d7751b0f0215b1e61aa")
("imenu-list" . "76f2335ee6f2f066d87fe4e4729219d70c9bc70d")
("jsonrpc" . "444cafedd091815e674b6c93458ba97a55a76928")
("leaf-convert.el" . "da86654f1021445cc42c1a5a9195f15097352209")
("leaf-keywords.el" . "82ec27e3441900daedeaaebca509181f964da81f")
("leaf-tree.el" . "89c3b8842df067bba67663d309f43aa311acdccd")
("leaf.el" . "69c9b057cdeee560450c1d04a9a058235ecff0f7")
("let-alist" . "35a1dae3c540705433a510c13c8af80206b29b5f")
("llama" . "5990ae7b5cba3425252f64b9377352c9a01690d5")
("lsp-dart" . "34e2a1191f723792d5f366b314cd6b07de4f1566")
("lsp-docker" . "ff41f4a76b640d39dc238bacba7f654c297827fa")
("lsp-haskell" . "aa9b5bce355790de1fbdbe239650d704f46a19a0")
("lsp-mode" . "c0cafd07ea7e0a2d82fcd0680eb36da10356d700")
("lsp-treemacs" . "3e5550f278db74f15ebe34add0138b138207ec08")
("lsp-ui" . "030d36960338fd633a98b332bc3734c412c25ca6")
("magit" . "7de46ddeb30e095645d93d73bbbc5fe3e8565ac5")
("map" . "6ac89e5dd1084afdc1d8fdd717de11c572212428")
("markdown-mode" . "d51c469133d220823cc6ab50ff8e8743ed6e42fb")
("mcf" . "4e44b6e24d9fe7a4ce7249df79f4473c0b473232")
("melpa" . "06f8868ff6e2966b8482cd100271e1d1afc2ce79")
("nix-mode" . "719feb7868fb567ecfe5578f6119892c771ac5e5")
("nongnu-elpa" . "cdbf329f7dae98bbd39a3bf090bd01793f6d5947")
("org" . "526a7d1cc65409d5546b009f54fed28726a9457d")
("org-ref" . "6a22c20f863b997497b618507adbcc8cb10a9f86")
("org-reveal" . "f55c851bf6aeb1bb2a7f6cf0f2b7bd0e79c4a5a0")
("org-roam" . "89dfaef38b6caa3027f20f96a551dc8f194ac533")
("org-roam-bibtex" . "b065198f2c3bc2a47ae520acd2b1e00e7b0171e6")
("org-roam-ui" . "5ac74960231db0bf7783c2ba7a19a60f582e91ab")
("ox-pandoc" . "5766c70b6db5a553829ccdcf52fcf3c6244e443d")
("parsebib" . "7bfde4e4679413424a9a9af099203d5c23e32cd2")
("parseclj" . "6af22372e0fe14df882dd300b22b12ba2d7e00b0")
("parseedn" . "3407e4530a367b6c2b857dae261cdbb67a440aaa")
("pdf-tools" . "30b50544e55b8dbf683c2d932d5c33ac73323a16")
("pfuture" . "19b53aebbc0f2da31de6326c495038901bffb73c")
("php-mode" . "40b8abed3079771e060dd99a56703520dabf5be4")
("poetry.el" . "1dff0d4a51ea8aff5f6ce97b154ea799902639ad")
("posframe" . "12f540c9ad5da09673b2bca1132b41f94c134e82")
("ppp.el" . "d5d854c3006dfd268e62c7f91c2aad6f86a505b5")
("project" . "a0ebb2e9cfda339d8ebda77447c9d822fe313c2d")
("python-mode" . "fcff76c308b4409007c61492e4936e7c0b7d5aee")
("pyvenv" . "31ea715f2164dd611e7fc77b26390ef3ca93509b")
("queue" . "8df1334d54d4735d2f821790422a850dfaaa08ef")
("racket" . "22e56ce80389544d3872cf4beb4008fb514b2218")
("rainbow-delimiters" . "f40ece58df8b2f0fb6c8576b527755a552a5e763")
("rainbow-mode" . "2e6b18609c2fdd1a2dc513937a64d276fd6cf24c")
("rust-mode" . "9915b3a585a7a75e9126df9e0e9d1df8057ae3cf")
("s.el" . "dda84d38fffdaf0c9b12837b504b402af910d01d")
("seq" . "da86da9bf111f68fb81efd466d76d53af5aebc00")
("sesman" . "7bca68dbbab0af26a6a23be1ff5fa97f9a18e022")
("slint-mode" . "168a6cfb90b5e36360074c83f80d5bbac2f0287e")
("spinner" . "fa117f0893788f3fe24673715a6b83bb34d238dd")
("straight.el" . "b7da472452615dc44b4ce76c64a059d6db3b7017")
("string-inflection" . "617df25e91351feffe6aff4d9e4724733449d608")
("tablist" . "fcd37147121fabdf003a70279cf86fbe08cfac6f")
("transient" . "07a104aa73b5d5e3168ba6e202ebfb60188af6ed")
("transient-dwim.el" . "cb5e0d35729fc6448553b7a17fc5c843f00e8c1d")
("treemacs" . "5fa84199501fd43e5573b1277a2b1699c7473cc1")
("web-mode" . "1eb0abb1a9bffbb33db7bbfc6efe5b48bf416d57")
("wfnames" . "164e4efa2a96bed201a0a5402e137ebeef15bcc6")
("with-editor" . "7787e19764c1089390584ac17a80129ef9afaa14")
("xref" . "63b5875528e9c8dba3abbc76dae1b49351273c1c")
("yaml-mode" . "d91f878729312a6beed77e6637c60497c5786efa")
("yaml.el" . "f99ef76c80e6fc3fcf650c4fe34e10726594a4c4"))
:gamma