Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer-font-mode doesn't switch to fixed-pitch for code-blocks #24

Open
TS-CUBED opened this issue Feb 21, 2023 · 1 comment
Open

Buffer-font-mode doesn't switch to fixed-pitch for code-blocks #24

TS-CUBED opened this issue Feb 21, 2023 · 1 comment

Comments

@TS-CUBED
Copy link

TS-CUBED commented Feb 21, 2023

I use poly-markdown and want to use variable-pitch mode fonts for the markdown text, and fixed mode fonts for the code blocks.

Mostly using Julia, but also Python (and others occasionally).

Is it possible to do that? I did try something like:

  (default ((t (:inherit variable-pitch))))
  (markdown-header-face ((t (:inherit serif))))
  (markdown-code-face ((t (:inherit fixed-face))))

in custom faces, but that doesn't seem to do the trick.

It does work in pure markdown-mode, but not in poly-markdown-mode.

@vspinu
Copy link
Contributor

vspinu commented Feb 21, 2023

If it works in markdown it should work in polymode buffer. markdown-code-face affects only anonymous blocks where the mode is not identified. If you want to change all code blocks where modes are identified then I am afraid it's much more dificult if not outright imposible. polymode is using emacs indirect buffers and as far as I know the default font is the same across all buffers. (related).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants