Skip to content

HardwareScript/hws_VS_Code_Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware Script Language Support

Official VS Code extension for Hardware Script v0.1.6 - the spatial hardware description language.

Features

  • Syntax Highlighting: Full TextMate grammar using standard scopes
  • Theme Compatibility: Works seamlessly with all VS Code themes (Dark Modern, Light Modern, Monokai, etc.)
  • Code Snippets: Quick templates for common Hardware Script patterns
  • Language Configuration: Smart bracket matching, auto-indentation, and comment toggling

Architecture

This extension follows VS Code best practices by using standard TextMate scopes instead of custom color themes. This means:

  • ✅ Automatic support for all user themes (light, dark, high contrast)
  • ✅ Consistent visual vocabulary across languages (purple = keyword, blue = type, etc.)
  • ✅ Zero maintenance for theme compatibility
  • ✅ Accessibility support for color-blind users

Standard Scopes Used

  • keyword.control.hw - Control flow (if, else, match, for, let, import)
  • storage.type.hw - Type declarations (module, space, struct, enum, component)
  • keyword.other.action.hw - Hardware actions (add, route, expose, reg)
  • keyword.operator.word.hw - Word operators (named, at, to, by, and, or)
  • constant.numeric.hw - Numbers
  • keyword.other.unit.hw - Physical units (mm, V, Hz, Ω, etc.)
  • variable.language.enum.hw - Built-in enums (North, South, tl, br, etc.)
  • entity.name.type.hw - Type names (PascalCase identifiers)
  • variable.other.property.hw - Properties and fields
  • string.quoted.double.hw - String literals
  • comment.line.number-sign.hw - Line comments
  • comment.block.hw - Block comments

Testing

Use Developer: Inspect Editor Tokens and Scopes (Ctrl+Shift+P) to see how tokens are classified and which theme rules apply.

Installation

  1. Copy the extension folder to your VS Code extensions directory
  2. Reload VS Code
  3. Open any .hw file to see syntax highlighting

License

See project root for licensing information.

About

VS Code extension providing syntax highlighting, language support, and tooling integration for Hardware Script (.hw) files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages