Proper way of customizing a mode's faces

Hi,

What happened?

I’m using ~meow_king/typst-ts-mode - Typst tree sitter major mode for Emacs. - sourcehut git and trying to customize some faces they define in ~meow_king/typst-ts-mode (main): typst-ts-faces.el - sourcehut git

This works:

(custom-set-faces!
  `(typst-ts-markup-rawblock-blob-face  :foreground ,(doom-color 'white))
  )
(use-package! typst-ts-mode
  :config
  (typst-ts-mode-watch-options "--open")
  )

But none of the following do:

  • Calling custom-set-faces! after use-package
  • Using :after or :before in use-package!.
    (use-package! typst-ts-mode
      :config
      (typst-ts-mode-watch-options "--open")
      )
      :after
      (custom-set-faces!
      `(typst-ts-markup-rawblock-blob-face  :foreground ,(doom-color 'white))
      )
    
  • Using :custom-face in use-package!:
    :custom-face
    (typst-ts-markup-rawblock-blob-face  ((t (:foreground ,(doom-color 'white)))))
    
  • Using custom-set-faces! inside after! typst-ts-mode or before! typst-ts-mode

From my searches, using :after or :custom-face should be the right way, yet only calling custom-set-faces before use-package! works. Does anyone know why?

System information


Loading data dump...

This topic was automatically closed after 90 days. New replies are no longer allowed.