~aodag/dotfiles

89e352bf7bbb73f87d79160de99fe2c652492274 — Atsushi Odagiri 5 months ago 30875a8
define html literal polymode on typescript
1 files changed, 16 insertions(+), 0 deletions(-)

M config/emacs/init.el
M config/emacs/init.el => config/emacs/init.el +16 -0
@@ 259,3 259,19 @@
                         (lsp))))  ; or lsp-deferred
(use-package rustic
  :straight t)

(use-package polymode
  :straight t
  :after (typescript-mode)
  :mode ("\.ts$" . poly-typescript-mode)
  :config
  (define-hostmode poly-typescript-hostmode :mode 'typescript-mode)
  (define-innermode poly-typescript-html-innermode
    :mode 'html-mode
    :head-matcher "html\`"
    :tail-matcher "\`"
    :head-mode 'host
    :tail-mode 'host)
  (define-polymode poly-typescript-mode
    :hostmode 'poly-typescript-hostmode
    :innermodes '(poly-typescript-html-innermode)))