summaryrefslogtreecommitdiff
path: root/config/emacs.org
diff options
context:
space:
mode:
Diffstat (limited to 'config/emacs.org')
-rw-r--r--config/emacs.org45
1 files changed, 13 insertions, 32 deletions
diff --git a/config/emacs.org b/config/emacs.org
index 2d87907..d262138 100644
--- a/config/emacs.org
+++ b/config/emacs.org
@@ -104,9 +104,10 @@ Emacs is self documenting, after all!
(prettify-symbols-mode))))
:config
(require 'tex-site)
+ (require 'subr-x)
(server-start)
- ;; start wiith sane defaults
+ ;; start with sane defaults
(pixel-scroll-precision-mode 1)
(display-battery-mode 1)
(display-time-mode 1)
@@ -164,22 +165,20 @@ This is my org mode configuration, which also configures latex.
(org-pretty-entities t "prettify org mode")
(org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files")
(org-default-notes-file (concat org-directory "/notes.org") "Notes file")
- (org-html-with-latex 'html)
- (org-html-mathjax-options nil)
- (org-html-mathjax-template "")
- (org-html-head-include-default-style nil) ; Clear Org's default CSS
- (org-html-head-include-scripts nil) ; Clear Org's default JS
+ (org-html-with-latex 'html "let my html handler handle latex")
+ (org-html-mathjax-options nil "disable mathjax, use MathML")
+ (org-html-mathjax-template "" "disable mathjax, use MathML")
+ (org-html-head-include-default-style nil "use my own css for everything")
+ (org-html-head-include-scripts nil "use my own js for everything")
(org-html-divs '((preamble "header" "preamble")
(content "main" "content")
- (postamble "footer" "postamble")))
+ (postamble "footer" "postamble")) "semantic html exports")
(org-html-head-extra (concat "<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Inconsolata-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<meta name=\"theme-color\" content=\"#ffffff\">\n<link rel=\"preload\" href=\"/fonts/Lora-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Bold.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"preload\" href=\"/fonts/CormorantGaramond-Medium.woff2\" as=\"font\" type=\"font/woff2\" crossorigin>\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\"><meta name=\"msapplication-TileColor\" content=\"#da532c\">\n"
- "<style>\n"
- (with-temp-buffer (insert-file-contents "~/monorepo/style.css") (buffer-string))
- "\n"
- (with-temp-buffer (insert-file-contents "~/monorepo/syntax.css") (buffer-string))
- "\n</style>"))
+ "<style>"
+ (with-temp-buffer (insert-file-contents-literally "~/monorepo/combined.css") (buffer-substring-no-properties (point-min) (point-max)))
+ "</style>") "add all these different headers for performance and compliance")
(org-latex-to-html-convert-command
- "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'")
+ "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^<p>//' -e 's/<\\/p>$//'" "latex to MathML with special character handling")
(org-html-viewport '((width "device-width")
(initial-scale "1.0")
(minimum-scale "1.0")) "Prevent zooming out past default size")
@@ -198,7 +197,7 @@ This is my org mode configuration, which also configures latex.
:html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>")))
("website-static"
:base-directory "~/monorepo"
- :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp"
+ :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf"
:publishing-directory "~/website_html/"
:recursive t
:publishing-function org-publish-attachment)
@@ -327,7 +326,6 @@ First, some small configurations and some evil-mode initilaization because I lik
(define-key evil-motion-state-map (kbd "TAB") nil))
(evil-collection-init))
-
(use-package evil-commentary
:after (evil)
:config
@@ -410,13 +408,6 @@ Org superstar adds those nice looking utf-8 bullets:
** LSP
We set up eglot, the LSP manager for emacs, now built in:
#+begin_src emacs-lisp :tangle ../nix/init.el
- ;; (use-package eglot
- ;; :hook
- ;; (prog-mode . eglot-ensure)
- ;; (nix-mode . eglot-ensure)
- ;; :config
- ;; (add-to-list 'eglot-server-programs '(nix-mode . ("nil"))))
-
(use-package lsp
:hook
(prog-mode . lsp))
@@ -647,16 +638,6 @@ emacs keybindings.
** LLM
I use LLMs in order to help me come up with ideas. I use a local LLM so that I can have a
competitive LLM that doesn't cost money.
-#+begin_src emacs-lisp :tangle ../nix/init.el
- ;; (use-package ellama
- ;; :custom
- ;; (ellama-sessions-directory "~/org/ellama/" "Set org directory for LLM sessions")
- ;; :init
- ;; (require 'llm-ollama)
- ;; (setopt ellama-provider (make-llm-ollama
- ;; :host "localhost"
- ;; :chat-model "qwen2.5:14b")))
-#+end_src
*** Minuet
Minuet does my code completion, showing the potential code completion as a ghost and automatically completing the code when my cursor is
still. It is kind of like copilot but it works with local LLMs, which is better. Though, it's obviously not always the most accurate.