TypoScript HighlightingSyntax highlighting for TYPO3 TypoScript and TSconfig in Visual Studio Code and VSCodium. Distinguish object paths, values, constants, imports and comments at a glance, with comment rules that adapt to your TYPO3 project. Use your editor's theme or choose your own colors for nine syntax categories. The extension recognizes Install · Get started · Customize colors · TYPO3 versions · Troubleshooting TypoScript and the color picker side by side. This example uses a custom palette; a fresh installation follows your editor theme. Click any screenshot to view it at full size. What the extension does
This is a syntax-highlighting extension with editing helpers. It does not provide autocomplete, code formatting, error diagnostics or a language server, and does not validate or run your TYPO3 configuration. Installation
You can also open Extensions, search for TYPO3 - TypoScript Highlighting, and install the extension by Stefan Sofka. Its extension ID is Requires a VS Code-compatible editor with API version 1.70 or newer. No separate Node.js, npm or PHP installation is needed to use the extension. Composer files are optional and are only used for automatic TYPO3 version detection. Install a VSIX manually
For version 1.3.1, you can instead run either command from the directory containing the download:
Quick start
You can start editing immediately. To change colors, follow the picker instructions below. For legacy Customize colorsOpen the picker and choose a color
Each row controls one syntax category. The selected swatch, spectrum and hex field stay in sync. Valid changes save automatically and apply to open TypoScript files. The picker also accepts hex values without Choose where colors apply
Opening the picker or switching its scope does not change settings. The view displays saved or inherited extension colors for the selected scope. More specific overrides can take precedence over the color you are editing. Restore your editor themeClick System Default beside a category, or clear its hex field. That category returns to the active editor theme and follows future theme changes. Reset the categories you changed to return to theme colors. System Default works with dark and light editor themes. Empty fields mean the extension leaves the category's color to your theme. System Default writes an empty string at the selected scope, overriding an inherited extension color. To inherit a User or Workspace color again, remove the more specific setting from your editor's settings. Custom colors affect syntax foregrounds; your theme continues to control font styles and the rest of the editor's appearance. Settings referenceOpen Settings and search for All color keys start with
For example, add this to User settings or your project's
Other categories keep their inherited extension colors or theme defaults. Colors apply to both TypoScript and TSconfig, in all three TypoScript language modes. Existing hex overrides and legacy TYPO3 version and comment rulesLeave Comment Rules on Auto (Composer detection) for most projects. Detection searches upwards from each document for the nearest TYPO3 Composer project, including when you open only a Sitepackage subdirectory. It uses a usable installed version from
The Settings dropdown has separate TYPO3 12, 13 and 14 entries even though they share one grammar. If no version can be determined, the extension uses v12+ rules. Ambiguous version constraints also use this fallback; set the version explicitly for a TYPO3 11 project that cannot be detected. Search Settings for
In Auto mode, select TypoScript (v11) or TypoScript (v12+) in the status bar to pin the open document to that mode. Choose TypoScript to resume detection. An explicit Comment Rules setting takes precedence over manual language selection. Changes to Composer files or the setting refresh the rules automatically. Why a comment marker may stay part of a valueIn a normal assignment, everything after
A multiline value starts with
TroubleshootingA file has no TypoScript highlightingAutomatic recognition covers
TYPO3 13 or 14 shows “TypoScript (v12+)”That is expected: TYPO3 12, 13 and 14 share the modern comment grammar. The label identifies the grammar rather than the exact installed TYPO3 release. A color change or reset seems to have no effectCheck Save colors in and any more specific Workspace or Folder overrides. Reset at the scope that supplies the effective color. Also check that the file is in a TypoScript language mode; extension colors do not apply to unrelated languages. Highlighting still looks wrongCheck Comment Rules and the assignment examples above. For extension update errors, open View → Output and select TypoScript Highlighting. When reporting an issue, include a small code sample, TYPO3 and editor versions, language mode, Comment Rules setting, theme, and a screenshot showing the problem. Describe the result you expected. Development and contributionsSee the development guide for setup, tests, grammar generation, debugging and VSIX packaging. Architecture and previous verification results are recorded in the project review and development log. Pull requests with focused changes and a small reproducible example are welcome. LicenseMIT © Stefan Sofka. |


