Language server for TYPO3 Fluid templates. Supports TYPO3 12.4, 13.4 and 14.
Warning
This project is entirely AI-generated. All code, tests and documentation were written by an AI model (Claude). It was built for my own personal use and is published as-is.
- No guarantee of future development, maintenance, bug fixes or support.
- Issues and pull requests may go unanswered.
- Use at your own risk. If you rely on it, fork it.
- Completion: ViewHelper names (tag and inline syntax) and their arguments; partial, section and layout names in
f:renderandf:layout; translation keys inf:translateandLLL:references - Hover: ViewHelper and argument documentation; the label of a translation key
- Go to definition: the ViewHelper's PHP class; the partial, section or layout; the
trans-unitof a translation key - Diagnostics: unknown ViewHelpers, unknown arguments and missing required arguments, plus the first error from Fluid's own parser (unclosed or badly nested tags, unknown namespaces)
Global namespaces, xmlns: declarations and {namespace} declarations are all picked up.
Nothing is installed in the project. The server boots the project's own TYPO3, because only the project knows which ViewHelpers are installed:
bin/fluid-lsp /path/to/typo3-projectDeprecations are muted: host PHP is often newer than the project's.
local bin = "/path/to/fluid-lsp/bin/fluid-lsp"
vim.lsp.config("fluid_lsp", {
filetypes = { "fluid" },
root_dir = function(bufnr, on_dir)
for dir in vim.fs.parents(vim.api.nvim_buf_get_name(bufnr)) do
if vim.uv.fs_stat(dir .. "/vendor/typo3/cms-core") then
return on_dir(dir)
end
end
end,
cmd = function(dispatchers, config)
return vim.lsp.rpc.start({ bin, config.root_dir }, dispatchers)
end,
})
vim.lsp.enable("fluid_lsp")composer ci # PHPStan, PHPUnit, php-cs-fixer
php Build/smoke-test.php Build/v13 # end-to-end against a real instanceBuild/v12, Build/v13 and Build/v14 hold one composer.json each. Set one up with composer install and
vendor/bin/typo3 setup --driver=sqlite. The smoke test also works against any real project path.