Open fuzunspm opened 2 years ago
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
.
how should i set it? below is not working
(setq markdown-code-lang-modes (("js" . 'rjsx-mode)))
(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.
js-mode
and rainbow-delimiters-mode
work well.
Yes same here, raindow delimeters works only
js2-mode and rjsx-mode don't use emacs's font locking mechanism and use it's custom parser ported from Mozilla's Rhino. The way to fix this issue is to map js to the new js-mode or js-ts-mode
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
Screenshot of Markdown Mode
Screenshot of VSCode
Screenshot of Emacs config of the same code block in a .js file