markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Missing colored syntax highlighting

Open fuzunspm opened this issue 2 years ago • 5 comments

Expected Behavior

Syntax highlighting within code block seems missing. Example SS below. It looks a bit dull. Is it possible to configure it in a way that my emacs config does?

Software Versions

  • Markdown Mode: 2.5-dev
  • Emacs: 27.2
  • OS: Arch Linux

Screenshot of Markdown Mode

image

Screenshot of VSCode

image

Screenshot of Emacs config of the same code block in a .js file

image

fuzunspm avatar Mar 02 '22 17:03 fuzunspm

Could you show us your javascript configuration ? By default, markdown-mode applies js-mode for js code block. If you use another major-mode, you need to modify markdown-code-lang-modes.

syohex avatar Mar 03 '22 02:03 syohex

how should i set it? below is not working

(setq markdown-code-lang-modes (("js" . 'rjsx-mode)))

fuzunspm avatar Mar 04 '22 13:03 fuzunspm

(add-to-list 'markdown-code-lang-modes '("js" . rjsx-mode))

The configuration is like above snippet. However it looks that it doesn't work. js2-mode which rjsx-mode depends on does not work too. I don't understand why those modes don't work well.

syohex avatar Mar 04 '22 13:03 syohex

Screenshot from 2022-03-04 23-02-09

js-mode and rainbow-delimiters-mode work well.

syohex avatar Mar 04 '22 14:03 syohex

Yes same here, raindow delimeters works only

fuzunspm avatar Mar 04 '22 14:03 fuzunspm