question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use VS Code's syntax highlighting in Markdown preview

See original GitHub issue

Issue Type: Bug

When I use "editor.semanticHighlighting.enabled": true, TypeScript looks great, but now the Markdown code looks bad in comparison. Please see the screenshot. Screenshot from 2020-02-24 14-31-46

VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:50:36.977Z) OS version: Linux x64 4.18.0-147.5.1.el8_1.x86_64

System Info
Item Value
CPUs Intel® Core™ i7-4770S CPU @ 3.10GHz (8 x 3681)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 0
Memory (System) 7.50GB (2.44GB free)
Process Argv –no-sandbox --unity-launch /home/david/sites/Link to typing objects cheat-sheet.md
Screen Reader no
VM 0%
Extensions (9)
Extension Author (truncated) Version
vscode-deno axe 2.0.4
spellright ban 3.0.50
vscode-eslint dba 2.1.1
prettier-vscode esb 3.20.0
shell-format fox 7.0.1
debugger-for-chrome msj 4.12.6
LiveServer rit 5.6.1
shellcheck tim 0.9.0
quokka-vscode Wal 1.0.279

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:19
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mjbvzcommented, Feb 25, 2020

See #56356 for api feature request to get colors as they appear in the editor

Try this extension to get closer to VS Code’s highlighting (but still without semantic highlighting): https://marketplace.visualstudio.com/items?itemName=bierner.markdown-shiki

0reactions
znorman-harriscommented, Aug 4, 2022

Another place where this is very apparent: new languages added to VSCode don’t have syntax highlighting by default in the markdown preview. Oddly enough, any code blocks added as markdown and displayed via hover help and a language server have the proper color/style to match the editor, but are lacking from the markdown preview.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown Preview VS Code Highlighting
Use VS Code's highlighter for code blocks in the built-in markdown preview. ... Launch VS Code Quick Open ( Ctrl+P ), paste the...
Read more >
Can VS Code's Markdown Preview code blocks match your ...
The code blocks in the preview pane of markdown files in VS Code to match the background and syntax highlighting of the code...
Read more >
VS Code - Markdown Guide
Its out-of-the-box Markdown support includes: CommonMark support; Syntax highlighting; Preview; Autocompletion; Themes; Code style. It does not support WYSIWIG ...
Read more >
Syntax highlighting in VS Code markdown
The IRIS language server (etc.) is enabled, and classes in the repository this documentation is in, are syntax highlighted properly. However, the code...
Read more >
Syntax highlighting for fenced code blocks - GitHub Pages
Syntax highlighting in preview uses the one bundled with VS Code's built-in vscode.markdown-language-features extension. In exporting to HTML, it uses the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found