Skip to content

A VS Code Extension that adds syntax highlighting to WordPress and Gutenberg decorators and function calls that exist inside traditional comment blocks

License

Notifications You must be signed in to change notification settings

MatthiasHunt/wordpress-syntax-highlighter

Repository files navigation

This extension provides syntax highlighting for the following WordPress syntaxes that exist inside traditional comment blocks:

  • Plugin header fields (PHP)
  • Block patten fields (PHP)
  • Theme header fields (style.css)
  • Block markup (HTML + JSON)

Examples

HTML

Screenshot of an HTML file containing colorized WordPress blocks

CSS

Screenshot of a CSS WordPress theme file containing a colorized header

PHP

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Additional Features

The Syntax Highlighter also implements rules for pattern/header field validation based on the following official documentation:

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Unmatched brackets cause error highlighting inside the embedded JSON of WordPress blocks

Screenshot of a PHP WordPress theme file containing a colorized block pattern header and colorized HTML

Credits

This project was inspired by Gutenberg Comment Highlight by @chrisrhymes

Wapuu design by @marktimemedia

About

A VS Code Extension that adds syntax highlighting to WordPress and Gutenberg decorators and function calls that exist inside traditional comment blocks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •