From 76b76619eec2d6eb35d6d892ee8da8bb69bb15a3 Mon Sep 17 00:00:00 2001
From: Leni Aniva <v@leni.sh>
Date: Wed, 26 Feb 2025 21:02:38 -0800
Subject: [PATCH] feat: Additional language support for doomemacs

---
 doom/config.org | 38 ++++++++++++++++++++++++++++++++++++++
 doom/init.el    |  4 ++--
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/doom/config.org b/doom/config.org
index 3079e2e..4682d5d 100644
--- a/doom/config.org
+++ b/doom/config.org
@@ -160,6 +160,23 @@ Modifications to the default key bindings to mimic spacemacs
 (map! :nvi "C" nil) ; remove this one weird binding
 
 (map! "<f12>" #'toggle-input-method)
+
+; Remap JIS yen key to backslash
+(global-set-key (kbd "M-¥") (kbd "\\"))
+(global-set-key (kbd "M-|") (kbd "|"))
+(global-set-key (kbd "C-M-¥") (kbd "C-\\"))
+#+end_src
+
+** Scroll
+
+#+begin_src emacs-lisp :tangle packages.el
+(use-package ultra-scroll
+	;:load-path "~/code/emacs/ultra-scroll" ; if you git clone'd instead of package-vc-install
+	:init
+	(setq scroll-conservatively 101 ; important!
+	      scroll-margin 0)
+	:config
+	(ultra-scroll-mode 1))
 #+end_src
 
 ** Font settings
@@ -263,6 +280,9 @@ numbers are disabled. For relative line numbers, set this to ~relative~.
 	css-indent-offset 3
 	sh-indentation 3
 	nxml-indent-offset 3
+	tex-indent-arg 3
+	tex-indent-item 3
+	tex-indent-basic 3
 )
 #+end_src
 
@@ -648,6 +668,24 @@ Add the necessary hooks for LilyPond mode.
 	(setq rustic-indent-offset standard-indent))
 #+end_src
 
+*** Typst
+
+#+begin_src emacs-lisp :tangle packages.el
+(package! typst-ts-mode :recipe (
+	:type git :host codeberg :repo "meow_king/typst-ts-mode"))
+#+end_src
+#+begin_src emacs-lisp
+(map! :after typst-ts-mode
+	:localleader
+	:map typst-ts-mode-map
+	:desc "Preview"            "p" #'typst-ts-preview
+	:desc "Compile"            "c" #'typst-ts-compile
+	:desc "Compile & Preview"  "P" #'typst-ts-compile-and-preview
+	:desc "Watch start"        "w" #'typst-ts-watch-start
+	:desc "Watch stop"         "W" #'typst-ts-watch-stop
+	)
+#+end_src
+
 ** Tools
 
 *** Language Server Protocol (LSP)
diff --git a/doom/init.el b/doom/init.el
index cec1284..a293c5d 100644
--- a/doom/init.el
+++ b/doom/init.el
@@ -146,9 +146,9 @@
        (julia +lsp)        ; a better, faster MATLAB
        ;;kotlin            ; a better, slicker Java(Script)
        (latex +latexmk +lsp) ; writing papers in Emacs has never been so fun
-       ;;lean              ; for folks with too much to prove
+       ;lean              ; for folks with too much to prove
        ledger            ; be audit you can be
-       ;;lua               ; one-based indices? one-based indices
+       lua               ; one-based indices? one-based indices
        markdown          ; writing docs for people to ignore
        ;;nim               ; python + lisp at the speed of c
        nix               ; I hereby declare "nix geht mehr!"
-- 
2.44.1