kleinesfilmroellchen / serenity-dsl-syntaxhighlight

VSCode extension for syntax highlighting SerenityOS' DSLs

Home Page:https://marketplace.visualstudio.com/items?itemName=kleinesfilmroellchen.serenity-dsl-syntaxhighlight

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serenity-dsl-syntaxhighlight – Syntax highlighting for SerenityOS' DSLs

Syntax highlighting for SerenityOS' Domain Specific Languages:

  • .ipc: Endpoint specification for the Inter Process Communication protocol.
  • .gml: Graphical Markup Language for creating SerenityOS GUI application layouts.
  • .idl: Web-IDL which SerenityOS's LibWeb directly uses to generate web API bindings.
  • The LibJS Bytecode serialization format (no extension) as output by js with the -d option.

Features

Provides TextMate Grammar-based syntax highlighting for the IPC and GML languages, as well as the LibJS Bytecode serialization format. Syntax highlighting is mostly compliant with SerenityOS' own syntax highlighters (in the case of GML) and code generators (in the case of IPC).

Additionally it provides TextMate Grammar-based syntax highlighting for Web-IDL with all extensions to it that SerenityOS uses.

GML syntax highlighting

IPC syntax highlighting

Web IDL syntax highlighting

LibJS Bytecode serialization highlighting

GML formatting

Allows formatting GML files with SerenityOS's own GML formatter. This is accomplished via the Lagom build of gml-format, so in order for the formatter to work, you need to build Lagom (see the options for the Meta/serenity.sh main script) and your workspace directory needs to be the Serenity root itself in order for the GML formatter to be found under Build/lagom/gml-format.

Known Issues

GML

GML uses the .gml extension, which is also used for the GameMaker language. You may have to set the language for each file manually.

The GML formatter needs to save the file in order to format it, so formatting and keeping a file unsaved is not currently possible.

Web-IDL

  • Extended attribute highlighting may not be spec-compliant.

LibJS Bytecode

  • It does not have an extension
  • Auto-detection does not seem to work, instead it is usually detected as Markdown

Contributing

I always appreciate help with developing this extension. Here's some things you can do:

  • File an issue on GitHub if something doesn't work as expected or if you are missing a feature. This is especially important when Serenity changes features of the DSLs (which doesn't happen often but can in theory do so at any time).
  • Help with the Shell syntax highlighting, which is currently stalling around on the shell branch.
  • Improve Serenity's gml-format and this extension's integration, so that more advanced features like selection formatting, saveless formatting or setting the formatter path are possible.
  • Check and improve the spec compliance of the Web IDL highlighter.

About

VSCode extension for syntax highlighting SerenityOS' DSLs

https://marketplace.visualstudio.com/items?itemName=kleinesfilmroellchen.serenity-dsl-syntaxhighlight

License:MIT License


Languages

Language:TypeScript 100.0%