Skip to content

Add Nand2Tetris language support - #6508

Open
ronketer wants to merge 13 commits into
zed-industries:mainfrom
ronketer:main
Open

ronketer wants to merge 13 commits into
zed-industries:mainfrom
ronketer:main

Conversation

@ronketer

@ronketer ronketer commented Jun 16, 2026 •

Copy link
Copy Markdown

Adds the Nand2Tetris extension for students working through The Elements of Computing Systems (Nand2Tetris).

Features

  • Languages: HDL (.hdl), Hack assembly (.asm), and Jack (.jack)
  • Syntax highlighting: Syntax highlighting for all three languages
  • Code outline: Navigation for HDL chips, Jack classes and subroutines, and Hack labels
  • Editing: Auto-closing brackets across all three languages, plus bracket matching and auto-indent for HDL and Jack
  • Snippets: Built-in chip templates for HDL and boilerplate templates for Jack
  • No Rust code: Grammar-only extension with no language server required

Third-Party Grammars

This extension uses existing Tree-sitter grammars maintained by their respective authors:

Testing & Verification

  • Tested manually in Zed 1.28.1 on Windows 11 Pro (at commit ab6b6f6)
  • Verified syntax highlighting, code outline, bracket behavior, snippets, comment toggling, and no errors in the Zed log
  • Packaging check passed using the registry's zed-extension tool on Linux (Ubuntu via WSL)

Screenshots

Screenshot 2026-11-17 094507 Screenshot 2026-11-17 094455 Screenshot 2026-11-17 094524

Known Limitations

  • .asm files overlap with the Assembly extension; the README shows how to choose between them using file_types.
  • The upstream HDL grammar does not parse plain /* */ comments, indexed part pins, or bus ranges (listed in the README).

License

MIT

@cla-bot

cla-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @ronketer on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@ronketer

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jun 16, 2026
@cla-bot

cla-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@ronketer ronketer closed this Jun 26, 2026
@ronketer ronketer reopened this Jun 26, 2026
@ronketer ronketer changed the title feat: add nand2tetris language extension Add Nand2Tetris language support Nov 17, 2026
@ronketer

Copy link
Copy Markdown
Author

Hi! for whenever someone has time, the CI and Danger runs on this PR seem to be waiting for workflow approval (first time contributor), so they end up failing with no jobs run. Locally the extension packages fine with the same zed-extension CLI revision as upstream CI, and the license, ID, sort order and grammar pins all check out. Happy to change anything. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant