VSCode Extension for Fluid Templating LanguageThis extension for VSCode (and compatible code editors) provides language support for the Fluid Templating Engine. https://github.com/user-attachments/assets/c1808e64-2939-4674-918f-fdfb58d3baf3 InstallationThe extension is available in the common marketplaces: It has been tested with: Features
Live Template AnalysisThe extension is able to utilize available binaries in your project to provide live template analysis for Fluid templates, e. g. to detect syntax errors or deprecations. This works out-of-the-box for Fluid 5.3 (or higher) and TYPO3 14.3 (or higher). In older TYPO3 versions the companion extension needs to be installed. The following folders are checked for the
If DDEV is available and the project has DDEV set up, the binaries
are executed inside of the web container by default. This can be turned off by disabling
If necessary, custom binaries can also be specified in the extension's configuration via
ViewHelper Autocomplete & DocumentationThe extension currently doesn't include a dedicated language server for Fluid. Instead, it relies on the built-in HTML language support of VSCode to provide autocompletion and inline documentation for ViewHelpers. This comes with some limitations:
The advantage of this approach is that no built-in features for HTML are lost in the process, this includes highlighting, autocompletion, auto-closing of tags, Emmet, inline documentation, embedded CSS and JavaScript and previews for color values. File DetectionFiles matching the following description are considered Fluid HTML files:
Files matching the following description are considered Fluid Text files:
Development & ContributionWe welcome contributions from the community to further improve the developer experience of Fluid templating in VSCode! To get started with your local setup, you need General Setup
For bigger changes, it is advisable to use the development and debugging workflow suggested in the official documentation. Generate ViewHelper AutocompletionThe current autocompletion is based on the
Custom Data format,
which is read by VSCode's built-in HTML language server.
To generate this file format, a small PHP project installs Fluid Standalone and
all TYPO3 core extensions that expose a global ViewHelper namespace (EXT:fluid, EXT:core
and EXT:form), extracts the ViewHelper API definitions from their source code and writes
the Custom Data json files to
Publishing to MarketplacePublishing is only possible with access to the registered publisher in Visual Studio Code Marketplace as well as a personal access token with the "manage marketplace" permission. Details are available in publishing extension. Same goes for Open VSX, see Publishing with the ovsx Command. Currently, this is done locally:
Packaging is already setup in GitHub Actions. Once the release workflow is finalized and properly tested, this can be moved to GitHub Actions as well. Language Server ResearchDuring the creation of this extension, research and experiments have been done on the topic of a dedicated Fluid language server: |