Use VS Code's syntax highlighting in Markdown preview
See original GitHub issueIssue 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.
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:
- Created 4 years ago
- Reactions:19
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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.