Files
doom/config.el

63 lines
2.4 KiB
EmacsLisp
Raw Normal View History

2025-11-16 15:47:31 +11:00
(setq doom-font (font-spec :family "Maple Mono" :size 20))
(add-to-list 'default-frame-alist '(height . 53))
(add-to-list 'default-frame-alist '(width . 120))
2025-11-16 22:05:10 +11:00
(setq catppuccin-flavor 'mocha)
2025-11-16 20:46:00 +11:00
(setq doom-theme 'catppuccin)
2025-11-16 15:47:31 +11:00
(setq display-line-numbers-type 'relative)
(setq org-directory "~/org/")
2025-11-16 22:05:10 +11:00
(use-package! yasnippet
:config
(defun my-yas-try-expanding-auto-snippets ()
(when yas-minor-mode
(let ((yas-buffer-local-condition ''(require-snippet-condition . auto)))
(yas-expand))))
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
)
2025-11-16 15:47:31 +11:00
2025-11-17 01:34:12 +11:00
(use-package! gptel
2025-11-16 22:05:10 +11:00
:config
2025-11-17 01:34:12 +11:00
(setq! gptel-api-key "e994f45f9b46cc8608bd2e9cd508417255514e96913b1764aab612512aa66449")
2025-11-17 16:07:41 +11:00
(setq gptel-model 'gpt-5)
2025-11-17 01:34:12 +11:00
(setq gptel-backend (gptel-make-gh-copilot "Copilot"))
(map! "M-s RET" #'gptel-send)
(map! "M-s m" #'gptel-menu)
)
2025-11-16 19:12:34 +11:00
(use-package! typst-ts-mode
2025-11-16 22:05:10 +11:00
:init
(add-hook 'typst-ts-mode-hook #'eglot-ensure)
:custom
;; (typst-ts-watch-options "--open")
(typst-ts-mode-grammar-location (expand-file-name "tree-sitter/libtree-sitter-typst.so" user-emacs-directory))
(typst-ts-mode-enable-raw-blocks-highlight t)
:config
(keymap-set typst-ts-mode-map "C-c C-c" #'typst-ts-tmenu))
2025-11-16 19:12:34 +11:00
(with-eval-after-load 'eglot
2025-11-16 22:05:10 +11:00
(with-eval-after-load 'typst-ts-mode
(add-to-list 'eglot-server-programs
`((typst-ts-mode) .
,(eglot-alternatives `(,"tinymist"
"typst-lsp"))))))
2025-11-16 20:05:31 +11:00
(use-package! websocket)
(use-package! typst-preview
2025-11-16 22:05:10 +11:00
;; :load-path "path/to/typst-preview.el" ;; if installed manually
:init
(setq typst-preview-autostart t) ; start preview automatically when typst-preview-mode is activated
;; (setq typst-preview-open-browser-automatically t) ; open browser automatically when typst-preview-start is run
2025-11-16 20:05:31 +11:00
2025-11-16 22:05:10 +11:00
:custom
(typst-preview-browser "default") ; this is the default option; other options are `eaf-browser' or `xwidget'.
(typst-preview-invert-colors "auto") ; invert colors depending on system theme
(typst-preview-executable "tinymist") ; path to tinymist binary (relative or absolute)
(typst-preview-partial-rendering t) ; enable partial rendering
2025-11-16 20:05:31 +11:00
2025-11-16 22:05:10 +11:00
:config
(define-key typst-preview-mode-map (kbd "C-c C-j") 'typst-preview-send-position)
(define-key typst-ts-mode-map (kbd "C-c C-l") #'typst-preview-mode))
2025-11-17 16:07:41 +11:00
(use-package! org
:hook (org-mode . org-latex-preview-mode))