phoenixframework / vscode-phoenix

Syntax highlighting support for Phoenix templates in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=phoenixframework.phoenix
MIT License
157 stars 10 forks source link

Fix commenting feature in H sigils #15

Closed basilenouvellet closed 1 year ago

basilenouvellet commented 1 year ago

Problem

Commenting in *.heex files works as expected with <%!-- ... --%> tokens introduced by #14.

In H sigils though, commenting does not work because code is considered as classic Elixir code (# ... token is used).

commenting_issue_in_h_sigils.webm

Solution

Make VSCode consider code inside H sigils as phoenix-heex language, leveraging the embeddedLanguages feature.

commenting_issue_in_h_sigils_solved.webm

chrismccord commented 1 year ago

❤️❤️❤️🐥🔥