Cataclysm DDA JSON FormatterThis is an extension for VS Code, when enabled this will format json files according to the JSON style of data files for Cataclysm DDA project. InstallationOne of:
UsingWhen using default VS Code configuration this extension will be plug and play; enabling the extension will default to this formatter for JSON files and enable format-on-save feature. Saving a JSON file or executing a Format Document command will format current file to the JSON format required for Cataclysm DDA project's data files. If using non-default overrides you'll have to set this formatter manually, e.g. via Restarting VS Code should usually resolve any temporary issues. DemoSave file hotkey or CompilingTo compile or debug dev containers can be used, a guide on how to get started with dev containers can be found in VS Code docs. For a short pick me up guide: install "Docker Desktop for [Your OS]", install the Dev Containers extension in VS and you're good to go. Once VS Code is set up with dev containers you can clone the repository and open the folder in VS Code. A window should popup offering to "Reopen in container", confirm; once it finishes setting up the container (this also runs An npm package in dependencies handles the formatting, it has the C++ formatter parts from Cataclysm-DDA compiled to javascript with emscripten: https://github.com/cdda-toys/cdda-json-formatter-emscripten/blob/master/.github/workflows/build.yml LicenseKeep in mind the license is non-trivial - see LICENSE.txt:
|