Update
This commit is contained in:
17
config.el
17
config.el
@@ -1,19 +1,21 @@
|
||||
(setq-default tab-width 4)
|
||||
|
||||
(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))
|
||||
(setq catppuccin-flavor 'mocha)
|
||||
(setq doom-theme 'catppuccin)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
(setq catppuccin-flavor 'mocha)
|
||||
(catppuccin-reload)
|
||||
|
||||
(after! yasnippet
|
||||
(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))
|
||||
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
|
||||
)
|
||||
|
||||
;; accept completion from copilot and fallback to company
|
||||
(use-package! copilot
|
||||
@@ -34,6 +36,8 @@
|
||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
||||
|
||||
(use-package! typst-ts-mode
|
||||
: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))
|
||||
@@ -45,8 +49,7 @@
|
||||
(with-eval-after-load 'typst-ts-mode
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((typst-ts-mode) .
|
||||
,(eglot-alternatives `(,typst-ts-lsp-download-path
|
||||
"tinymist"
|
||||
,(eglot-alternatives `(,"tinymist"
|
||||
"typst-lsp"))))))
|
||||
|
||||
(use-package! websocket)
|
||||
|
||||
28
config.org
28
config.org
@@ -1,35 +1,37 @@
|
||||
* My doom config
|
||||
** Some tweak
|
||||
*** change indent size
|
||||
#+begin_src emacs-lisp
|
||||
(setq-default tab-width 4)
|
||||
#+end_src
|
||||
** Appearance settings
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(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))
|
||||
(setq catppuccin-flavor 'mocha)
|
||||
(setq doom-theme 'catppuccin)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq org-directory "~/org/")
|
||||
#+end_src
|
||||
*** Themes
|
||||
Catppuccin
|
||||
**** Catppuccin
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! catppuccin-theme)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq catppuccin-flavor 'mocha)
|
||||
(catppuccin-reload)
|
||||
#+end_src
|
||||
|
||||
** Plugins
|
||||
*** Yasnippet
|
||||
This enables the feature of auto-expanding snippets when matching the pattern
|
||||
#+begin_src emacs-lisp
|
||||
(after! yasnippet
|
||||
(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))
|
||||
(add-hook 'post-command-hook #'my-yas-try-expanding-auto-snippets)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
*** Eat (deprecated)
|
||||
@@ -89,6 +91,8 @@ Configuration
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! typst-ts-mode
|
||||
: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))
|
||||
@@ -103,8 +107,7 @@ Configuration
|
||||
(with-eval-after-load 'typst-ts-mode
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((typst-ts-mode) .
|
||||
,(eglot-alternatives `(,typst-ts-lsp-download-path
|
||||
"tinymist"
|
||||
,(eglot-alternatives `(,"tinymist"
|
||||
"typst-lsp"))))))
|
||||
#+end_src
|
||||
|
||||
@@ -133,3 +136,6 @@ Configuration
|
||||
(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))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: t
|
||||
|
||||
12
init.el
12
init.el
@@ -21,11 +21,11 @@
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
:completion
|
||||
;;company ; the ultimate code completion backend
|
||||
(corfu +orderless) ; complete with cap(f), cape and a flying feather!
|
||||
(corfu +icons +orderless) ; complete with cap(f), cape and a flying feather!
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
(vertico +icons + childframe) ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
@@ -56,10 +56,10 @@
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
(format +onsave +lsp) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
@@ -99,7 +99,7 @@
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
lookup ; navigate your code and its documentation
|
||||
;;llm ; when I said you needed friends, I didn't mean...
|
||||
(lsp +eglot +peek) ; M-x vscode
|
||||
(lsp +eglot +peek +booster) ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
@@ -148,7 +148,7 @@
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
latex ; writing papers in Emacs has never been so fun
|
||||
(latex +cdlatex +lsp +fold) ; writing papers in Emacs has never been so fun
|
||||
lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;; lua ; one-based indices? one-based indices
|
||||
|
||||
7
snippets/typst-ts-mode/display math
Normal file
7
snippets/typst-ts-mode/display math
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: display math
|
||||
# key: dm
|
||||
# condition: (and (not (texmathp)) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\$ $0 \$
|
||||
7
snippets/typst-ts-mode/inline math
Normal file
7
snippets/typst-ts-mode/inline math
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: inline math
|
||||
# key: mk
|
||||
# condition: (and (not (texmathp)) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
\$$0\$
|
||||
9
snippets/typst-ts-mode/theorem
Normal file
9
snippets/typst-ts-mode/theorem
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Theorem
|
||||
# key: #thm
|
||||
# condition: (and (not (texmathp)) (quote auto))
|
||||
# group: math
|
||||
# --
|
||||
#theorem()[
|
||||
$0
|
||||
]
|
||||
Reference in New Issue
Block a user