Compare commits

...

8 Commits

Author SHA1 Message Date
3ac7b61c9f Ignore Cleanup & More ORG 2024-06-16 11:24:45 -04:00
e8c6ed2665 Org Mobile 2024-06-05 17:26:59 -04:00
c33ee8bf2b Org: Load Export Backends 2024-06-05 15:10:27 -04:00
75669df3a5 Major Revisions, Much Cleaner 2024-06-05 15:09:36 -04:00
937e5d5518 Indentation changes and Structural changes 2024-06-05 09:53:46 -04:00
f8f64a0802 Merge remote-tracking branch 'origin/master' 2024-06-05 09:51:18 -04:00
e635fe48f8 Thesis Config 2024-06-05 09:48:19 -04:00
697aeeaafc Macos specific configs 2024-06-05 09:47:28 -04:00
5 changed files with 582 additions and 504 deletions

5
.gitignore vendored
View File

@@ -14,3 +14,8 @@ tramp
/result /result
/transient/ /transient/
/BROWSE /BROWSE
org-roam.db
bookmarks
.org-id-locations
.lsp-session-v1
.dap-breakpoints

163
custom.el
View File

@@ -3,169 +3,8 @@
;; 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
'("/home/universe/Documents/research/DBS/TechnicalEvaluation/technicaldraft.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
;; 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.

635
main.org
View File

@@ -14,7 +14,7 @@
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 and relations between packages etc.
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(eval-and-compile (eval-and-compile
(customize-set-variable (customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/") 'package-archives '(("org" . "https://orgmode.org/elpa/")
@@ -38,22 +38,34 @@ replacement for defining configs and relations between packages etc.
(leaf leaf-tree :ensure t) (leaf leaf-tree :ensure t)
(leaf leaf-convert :ensure t) (leaf leaf-convert :ensure t)
(leaf transient-dwim (leaf transient-dwim :ensure t
:ensure t
:bind (("M-=" . transient-dwim-dispatch))) :bind (("M-=" . transient-dwim-dispatch)))
#+end_src #+end_src
#+RESULTS:
: transient-dwim
** MacOS Specific
#+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 ** Performance
*** Garbage Collection *** Garbage Collection
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf gcmh :ensure t (leaf gcmh :ensure t
:hook (after-init-hook)) :hook (after-init-hook))
#+end_src #+end_src
*** Profiling *** Profiling
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf esup :disabled nil :ensure t) (leaf esup :disabled nil :ensure t)
#+end_src #+end_src
@@ -63,7 +75,7 @@ replacement for defining configs and relations between packages etc.
Ensure that the =custom.el= resides in the users' emacs directory. Ensure that the =custom.el= resides in the users' emacs directory.
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf custom-el (leaf custom-el
:config :config
;; Ensure custom writes to specific file ;; Ensure custom writes to specific file
@@ -75,7 +87,7 @@ Ensure that the =custom.el= resides in the users' emacs directory.
Set the backups directory to reside in the users' emacs directory. Set the backups directory to reside in the users' emacs directory.
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf backup (leaf backup
: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/
@@ -83,12 +95,12 @@ Set the backups directory to reside in the users' emacs directory.
`(("." . ,(concat user-emacs-directory "backups"))))) `(("." . ,(concat user-emacs-directory "backups")))))
#+end_src #+end_src
** Path Preservation ** Shell Path Preservation
Exec-path-from-shell ensures that path variable is preserved from Exec-path-from-shell ensures that path variable is preserved from
shell. shell.
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf exec-path-from-shell :ensure t (leaf exec-path-from-shell :ensure t
:config :config
(exec-path-from-shell-initialize)) (exec-path-from-shell-initialize))
@@ -98,7 +110,7 @@ shell.
Visual Theme of Emacs config: defined in the =themes= directory. 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
:doc "Visual Changes to Emacs" :doc "Visual Changes to Emacs"
:tag "builtin" "internal" :tag "builtin" "internal"
@@ -114,71 +126,141 @@ Visual Theme of Emacs config: defined in the =themes= directory.
(load-theme 'UniverseHighContrast)) (load-theme 'UniverseHighContrast))
#+end_src #+end_src
** Font Related * Version Control
#+begin_src elisp :tangle yes :exports code
*** 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
* Package Configuration
** Version Control
#+begin_src elisp :tangle yes
(leaf magit :ensure t :require t) (leaf magit :ensure t :require t)
#+end_src #+end_src
** Nix Related * Nix Related
*** Direnv ** 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 #+begin_src elisp :tangle yes :exports code
(leaf direnv (leaf direnv
:ensure t :ensure t
:config :config
(direnv-mode)) (direnv-mode))
#+end_src #+end_src
*** Nix-mode ** Nix-mode
=.nix= file mode =.nix= file mode
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf nix-mode :ensure t) (leaf nix-mode :ensure t)
#+end_src #+end_src
** WEB * IDE Like Things
** Which Key Again?
#+begin_src elisp :tangle yes :exports code
(leaf which-key :ensure t
:config (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
:config (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
- 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
* 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 #+begin_src elisp :tangle yes :exports code
(leaf web-mode (leaf web-mode
:ensure t :ensure t
:mode :mode
@@ -190,125 +272,82 @@ We all know the web is the future, obviously, of course.
:ensure t) :ensure t)
#+end_src #+end_src
** D2 * D2
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf d2-mode :ensure t) (leaf d2-mode :ensure t)
#+end_src #+end_src
** YAML * YAML
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf yaml-mode :ensure t) (leaf yaml-mode :ensure t)
#+end_src #+end_src
** IDE Like Things * Python Things
*** Company Completion!
We like autocomplete, it... is nice, okay? ** Python-mode
#+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 #+begin_src elisp :tangle yes :exports code
(leaf python-mode :ensure t (leaf python-mode :ensure t
: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 #+begin_src elisp :tangle yes :exports code
(leaf poetry :ensure t) (leaf poetry :ensure t)
#+end_src #+end_src
** Java
LSP for java is /nice/. * C
#+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. Who even needs C++, not me, no way, no how.
#+begin_src elisp :tangle yes
#+begin_src elisp :tangle yes :exports code
(leaf c-config
:hook c-mode-hook c++-mode-hook
:config
(leaf company-ctags :ensure t) (leaf company-ctags :ensure t)
(leaf company-c-headers :ensure t) (leaf company-c-headers :ensure t)
(leaf meson-mode :ensure t) (leaf meson-mode :ensure t))
#+end_src #+end_src
** Haskell
#+begin_src elisp :tangle yes * Haskell
(leaf haskell-mode :ensure t
:config #+begin_src elisp :tangle yes :exports code
(leaf haskell-mode :ensure t)
(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
#+begin_src elisp :tangle yes * Rust
(leaf rust-mode :ensure t)
#+begin_src elisp :tangle yes :exports code
(leaf rust-mode :ensure t
: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 #+begin_src elisp :tangle yes :exports code
(leaf mcf-mode (leaf mcf-mode
:el-get 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 #+begin_src elisp :tangle yes :exports code
(leaf rainbow-delimiters (leaf rainbow-delimiters
:ensure t :ensure t
:commands rainbow-delimiters-mode :commands rainbow-delimiters-mode
@@ -317,94 +356,97 @@ 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 #+begin_src elisp :tangle yes :exports code
(leaf geiser-racket :ensure t) (leaf geiser-racket :ensure t)
#+end_src #+end_src
** Org
* Org
We ensure that org is available (though it is builtin)
#+begin_src elisp :tangle yes :exports code
(leaf org :ensure t
: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"))
(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 #+begin_src elisp :tangle yes :exports code
(leaf ivy-bibtex :ensure t) (leaf org-ref :ensure t helm-bibtex pdf-tools
(leaf helm-bibtex :ensure t)
(leaf org-ref :ensure t
:after org :after org
:init
(leaf pdf-tools :ensure t)
:config
(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)))
: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
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
(leaf ox-reveal :ensure t
:require t
:after org
:config
(setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js"))
#+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 ox-reveal
:init
:bind* :bind*
("C-c ]" . org-ref-insert-link) ("C-c ]" . org-ref-insert-link)
("s-[" . org-ref-insert-link-hydra/body)
:hook
(org-mode-hook . auto-fill-mode)
:config :config
(set-fill-column 100) (setq org-bib-dir (concat document-dir "/Bibliography"))
(setq org-src-fontify-natively t (setq org-bib-file (concat org-bib-dir "/references.bib"))
org-confirm-babel-evaluate nil ;; Where should PDFs be stored
org-src-preserve-indentation t) (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)
(tempo-define-template "Fig. Caption" bibtex-completion-notes-path (concat org-bib-dir "/notes")
'("" (P "Image: " image t) bibtex-completion-notes-template-multiple-files "* ${author-or-editor}, ${title}, ${journal}, (${year}) :${=type=}: \n\nSee [[cite:&${=key=}]]\n"
(P "Caption: " caption t)
(P "Figure Name: " name t) bibtex-completion-additional-search-fields '(keywords)
"#+CAPTION: " (s caption) > n > bibtex-completion-display-formats
"#+NAME: fig:" (s name) > n > '((article . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} ${journal:40}")
"#+ATTR_LaTeX: :placement [H]" > n > (inbook . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} Chapter ${chapter:32}")
"[[" (s image) "]]" > n > p >) (incollection . "${=has-pdf=:1}${=has-note=:1} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
"<fig" "Inserts Figure with Caption") (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)
:require org-ref org-ref-helm oc-bibtex oc-bibtex oc-csl oc-natbib)
#+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")) (add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted) (setq org-latex-listings 'minted)
@@ -414,8 +456,14 @@ nice. Should use the export based templating probably. Eventually.
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%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}")))
(setq org-latex-pdf-process (setq org-latex-pdf-process
'("%latex -shell-escape -interaction nonstopmode -output-directory %o %f" '("%latex -shell-escape -interaction nonstopmode -output-directory %o %f"
@@ -425,28 +473,85 @@ nice. Should use the export based templating probably. Eventually.
"%latex -shell-escape -interaction nonstopmode -output-directory %o %f"))) "%latex -shell-escape -interaction nonstopmode -output-directory %o %f")))
#+end_src #+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:
#+begin_src elisp :tangle yes :exports code
(leaf ox-pandoc :ensure t :require t
:after org)
#+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):
#+begin_src elisp :tangle yes :exports code
(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.
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 #+begin_src elisp :tangle yes :exports code
(leaf gnuplot (leaf gnuplot
:ensure t) :ensure t)
#+end_src #+end_src
*** Org Mode Agenda/Calendar Things ** Org Mode Agenda/Calendar Things
**** Agenda Location *** 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 # Make it so that all files in the " src_elisp{org-agenda-files} " variable (e.g. "=~/Documents=") will be
(leaf org-agenda-file # 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 :after org
:config :config
(setq org-agenda-files '("~/Documents/org"))) (setq org-agenda-files `(,(concat org-directory))))
#+end_src #+end_src
**** Capture Things *** Capture Things
Unless specified otherwise, any captured note, date, meeting, idea, Unless specified otherwise, any captured note, date, meeting, idea,
should be put into the src_elisp{org-directory}. should be put into the src_elisp{org-directory}.
@@ -455,42 +560,92 @@ 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 =note.org=, which is where all captured things go when they aren't
told to go elsewhere. told to go elsewhere.
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes :exports code
(leaf org-capture-cfg (leaf org-capture
:after org :after org
:config :config
(setq org-directory "~/Documents/org")
(setq org-default-notes-file (concat org-directory "/notes.org"))) (setq org-default-notes-file (concat org-directory "/notes.org")))
#+end_src #+end_src
We also want to configure what type of things we want to capture, We also want to configure what type of things we want to capture,
e.g. meetings, deadlines and whatever else: e.g. meetings, deadlines and whatever else:
#+begin_src elisp :tangle yes
(leaf org-capture-what #+begin_src elisp :tangle yes :exports code
:after org (leaf org-capture
:after org-capture
:config :config
(add-hook 'org-capture-mode-hook #'org-id-get-create)
(setq org-capture-templates (setq org-capture-templates
'(("t" "Todo" entry (file+headline "todo.org" "Tasks") '(("t" "Todo" entry (file+headline "todo.org" "Tasks")
"* TODO %?\n %i\n %a") "* TODO %^{Todo?} %^G\nSCHEDULED: %^t\n:PROPERTIES:\n:ADDED: %U\n:END:\n %i\n %a \n%?\n")
("h" "Habit" entry (file+headline "todo.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") ("j" "Journal" entry (file+datetree "journal.org")
"* %?\nEntered on %U\n %i\n %a") "* %^{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") ("m" "Meeting" entry (file+headline "dates.org" "Meetings")
"* %^{prompt}\n:PROPERTIES:\n:CATEGORY: Meeting\n:END:\nWhen: %^t\nAdded: %U\nTags: %^g\n%?")))) "* %^{Meeting Title:} %^G\nSCHEDULED: %^t\n:PROPERTIES:\n:CATEGORY: Meeting\n:LOCATION: %^{LOCATION}\n:ADDED: %U\n:END:\n%?\n"))))
#+end_src #+end_src
** Flutter *** Habits
#+begin_src elisp :tangle yes
#+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
:require t
:config
(setq org-roam-directory (file-truename org-directory))
(org-roam-db-autosync-mode))
#+end_src
**** Org Roam Babel (ORB)
** 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))))
#+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
#+begin_src elisp :tangle yes * BQN
#+begin_src elisp :tangle yes :exports code
(leaf bqn-mode (leaf bqn-mode
:el-get "museoa/bqn-mode" :el-get "museoa/bqn-mode"
:config :defer-config
(leaf bqn-font (set-face-attribute 'bqn-default nil :family 'unspecified))
:after bqn-mode
:config
(set-face-attribute 'bqn-default nil :family 'unspecified)))
#+end_src #+end_src

79
src/nmodl.el Normal file
View File

@@ -0,0 +1,79 @@
(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))