Typst support
This commit is contained in:
30
config.org
30
config.org
@@ -4,7 +4,7 @@
|
||||
(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 doom-theme 'doom-one)
|
||||
(setq doom-theme 'doom-vibrant)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq org-directory "~/org/")
|
||||
#+end_src
|
||||
@@ -68,3 +68,31 @@ Configuration
|
||||
(add-to-list 'copilot-indentation-alist '(clojure-mode 2))
|
||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
||||
#+end_src
|
||||
|
||||
** Lang
|
||||
*** Typst
|
||||
**** Tree-sitter
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! typst-ts-mode :recipe (:host codeberg :repo "meow_king/typst-ts-mode"))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! typst-ts-mode
|
||||
: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))
|
||||
#+end_src
|
||||
|
||||
**** Tinymist (lsp)
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'eglot
|
||||
(with-eval-after-load 'typst-ts-mode
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((typst-ts-mode) .
|
||||
,(eglot-alternatives `(,typst-ts-lsp-download-path
|
||||
"tinymist"
|
||||
"typst-lsp"))))))
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user