phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Support for templates languages like Twig or Blade?

Open kanlukasz opened this issue 2 years ago • 4 comments

Hello, I would like to ask if you have any plan to support template languages like Twig or Blade?

By "support template languages" i mean:

  • Formatter
  • Syntax highlighting
  • Snippets
  • Emmet
  • HTML & CSS Intellisense
  • Hover
  • Go to
  • etc ?

kanlukasz avatar Apr 03 '23 14:04 kanlukasz

thank you for the question!

We do have basic support for the Blade (so .blade.php can be opened and PHP code works), but no code completion for the Blade yet though.

For the Twig, there are other extensions already. I know it would be great to have it integrated, so code completion would work for variables, etc.

Anyways, we have a plan to support it. I just can't tell any time frame.

jakubmisek avatar Apr 03 '23 14:04 jakubmisek

For the Twig, there are other extensions already.

At first glance, yes, but I have tested many and each works poorly. The biggest problem is formatting or abandoning maintenance

Anyways, we have a plan to support it. I just can't tell any time frame.

Ok, that's nice to hear. I will wait patiently 😃

kanlukasz avatar Apr 05 '23 09:04 kanlukasz

how is it progressing now?

dhenfie avatar Sep 30 '23 08:09 dhenfie

we have the following support for .blade.php so far:

  • [x] code analysis
  • [x] IntelliSense for PHP code inside blade files
  • [x] mouse hover, code actions, highlighting, find references, ...
  • [ ] pretty print format (in progress)
  • [ ] HTML format (in progress)
  • [ ] colorization of PHP code inside .blade files (in progress)
  • [ ] Snippets

we don't have .twig yet, but we'll be adopting the implementation we have from Microsoft Visual Studio 2022, which has formatting, highlighting, and IntelliSense including symbols defined in your PHP project;

jakubmisek avatar Sep 30 '23 11:09 jakubmisek