vscode-nushell-lang icon indicating copy to clipboard operation
vscode-nushell-lang copied to clipboard

Feature: Syntax highlighting grammar code nu code blocks in markdown preview

Open LoicRiegel opened this issue 9 months ago • 1 comments

Hi, first, thank your for this great extension 👍 💯

The syntax highlighting grammar in Nushell scripts (.nu files), but it's not working when you have a preview in VS code of a markdown file containing a nu code block.

I could try to work on it, I've never worked on VS code extensions but I'll figure it out :) Thanks a lot for your feedback

How to reproduce

Copy this to a markdown file and Open Markdown Preview in VS Code:

# inside md file
```nushell
plugin add target/debug/nu_plugin_example
# or then either restart your current nushell session or run:
plugin use target/debug/nu_plugin_example
```

taken from https://github.com/nushell/nushell/blob/main/crates/nu_plugin_example/README.md

Observe no syntax highlighting

Desired:

Syntax highlighting is on

LoicRiegel avatar Mar 07 '25 14:03 LoicRiegel

I'm not sure how to add syntax highlighting to markdown either. I think that would be a welcome addition to the extension if you can figure it out. Have at it. Thanks!

fdncred avatar Mar 07 '25 14:03 fdncred