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

Syntax highlighting in GFM code blocks #123

Closed
ihodes opened this issue Mar 18, 2016 · 5 comments
Closed

Syntax highlighting in GFM code blocks #123

ihodes opened this issue Mar 18, 2016 · 5 comments

Comments

@ihodes
Copy link
Contributor

ihodes commented Mar 18, 2016

Is this best supported through markdown-mode or through something like multi-mode highlighting?

@jrblevin
Copy link
Owner

There are a few such modes already, including mmm-mode and polymode.

@jrblevin
Copy link
Owner

For a while, I was using mmm-mode configured as described here: http://jblevins.org/log/mmm. I don't do this any more, though, and so I haven't followed these packages recently.

@ihodes
Copy link
Contributor Author

ihodes commented Mar 18, 2016

Awesome, I hadn't seen polymode. That'll work for me! Thank you :)

@ihodes ihodes closed this as completed Mar 18, 2016
@ntc2
Copy link

ntc2 commented Oct 18, 2016

Using polymode, it's trivial to highlight fenced code blocks in markdown-mode. All I needed to do was add the following to Emacs config:

(require 'markdown-mode)
(require 'poly-markdown)
(add-to-list 'auto-mode-alist '("\\.md\\'" . poly-markdown-mode))

Docs I used:

@jrblevin
Copy link
Owner

jrblevin commented Jun 8, 2017

Built-in support is in master now. See custom variable markdown-fontify-code-blocks-natively and interactive function markdown-toggle-fontify-code-blocks-natively (C-c C-x C-f).

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

3 participants