Skip to content

domino54/vscode-maniascript-snippets

Repository files navigation

This VS Code extension adds over 200 snippets for ManiaScript, a scripting language used in the racing game Trackmania (2020) and the UGC platform ManiaPlanet for TrackMania² and ShootMania.

Features

  • Import suggestions for standard namespaces (MathLib, TextLib, and others), with autocompletion for their methods.
  • Autocompletion for array and struct methods (existskey, fromjson, etc.).
  • Quickly scaffold functions, loops, control statements, directives, variable and trait declarations.
  • Insert manialink tags and a basic manialink layer template.
  • Generate common patterns, such as calling Page.GetFirstChild or looping over PendingEvents.

Demo

Demo

Recommendations

An extension providing ManiaScript grammar (MSLang or maniascript-support) is recommended.

Contributing

If you feel the snippets can be improved, please create a pull request or an issue.

The snippets are opinionated — some things, such as aliases for built-in namespaces (ML, TL) and the lack of explicit declaration types, are not subject to change.

Release Notes

Refer to the CHANGELOG for release notes.