-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drupal support #2
Comments
Hi @tanc, could you tell me the templates directory for your project, relative to the workspace directory? The mechanism of definitionProvider defaults to And have you tried to Ctrl+Click any of the template inclusion statements/functions?
The extension calls a Symfony command to get custom developer-defined twig functions, globals and filters. Since your project is based not on the Symfony framework, this won't work. The other features should work as expected. I will change the output message to better represent that behavior. |
The templates directory is at So I guess it would be good to have a workspace level config option for defining the templates directory or directories. Control clicking includes don't work for me. But it could be because the use string interpolation with a variable, like: |
Is it possible to get all template directories programmatically?
Yep, that's not supported |
What setting format could be good for Drupal case? I'm thinking of adding a new extension setting: "twiggy.tempateMappings": [
// include('template.html.twig') -> ./templates/template.html.twig
{ "alias": "", "path": "./templates" },
// include('@custom_theme_name/template.html.twig') -> ./web/themes/custom_theme_name/templates/template.html.twig
{ "alias": "@custom_theme_name", "path": "./web/themes/custom_theme_name/templates/" },
], This would work for Drupal projects as well as for other non-Symfony projects. But as far as I can see from Drupal quick start project (Download Drupal page, |
Will take a second look here after #10 is resolved. |
Hi @moetelo, I'm trying your fork on a Drupal project. Opening the project and looking at the Twig Language Server output I see:
Language server started for: /my-file-path/my-project
Twig info not initialized
Is there any way to tell why the Twig info is not initialising?
The text was updated successfully, but these errors were encountered: