Skip to content
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

Twig support #191

Open
marcoroth opened this issue Feb 26, 2024 · 4 comments
Open

Twig support #191

marcoroth opened this issue Feb 26, 2024 · 4 comments
Labels
enhancement New feature or request feature Issue that implements a new feature. symfony templating Issue that implements a templating language or templating features.

Comments

@marcoroth
Copy link
Owner

https://twig.symfony.com

@marcoroth marcoroth added enhancement New feature or request feature Issue that implements a new feature. templating Issue that implements a templating language or templating features. labels Feb 26, 2024
@jcsmithf22
Copy link

Has this been implemented? I am not getting autocomplete in my twig templates (symfony project)

@marcoroth
Copy link
Owner Author

Hey @jcsmithf22, sadly not quite yet, the current implementation only works on actual HTML tags.

So if you have regular HTML in Twig files it should work, but it doesn't work for Twig-specific syntax that might emit HTML.

@marcoroth
Copy link
Owner Author

This is similar for any other templating language. For ERB files in Rails projects it works for this for example:

<div data-controller="|">

But it doesn't work for something like:

<div>
  <%= tag.div(data: { controller: "|" }) %>
</div>

@jcsmithf22
Copy link

That's interesting, I am not having any autocomplete in twig. Here are a couple screenshots. I think it may not be finding the automatically registered controllers in Symfony either.

This is in twig:
image

This is in html:
image

image

This is in the controller:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature Issue that implements a new feature. symfony templating Issue that implements a templating language or templating features.
Projects
None yet
Development

No branches or pull requests

2 participants