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

Feat: syntax highlighting in markdown code blocks #195

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LoicRiegel
Copy link

Feature: add syntax highlighting inside nushell codeblocks in markdown files

Issue #192

Adds syntax highlighting for nushell code blocks when editing markdown files inside VS code

The code is very inspired from this repo.

⚠️ The syntax highlighting still is not available when opening the Preview of the md files in VS code. VS code uses something else (highlight.js) so that will be done and somewhere else I guess.

How to test

  1. Clone the branch
  2. Start debugging (F5) in VS Code
  3. Open a md files, create a nushell code block and start typing nushell code

Result

2025-03-10_23h17_14

@fdncred
Copy link
Contributor

fdncred commented Mar 11, 2025

I don't understand. What's the point of this PR if it doesn't highlight the text in markdown?

@LoicRiegel
Copy link
Author

It does while editing markdown files (left part of the screenshot). Currently we don't have syntax highlighting injected here, only while editing .nu files.

What still does not work is the right of the screenshot, the preview mode.

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

Successfully merging this pull request may close these issues.

2 participants