nushell / nushell/vscode-nushell-lang

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

Open
#192 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
153
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by opening the supplied Markdown example in VS Code's Markdown Preview, then inspect the extension's grammar and language registration for how Nushell code blocks are recognized. Confirm the change by verifying syntax highlighting appears for the fenced code block in the preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, vscode
Domain
devtools, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.