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

fix comments in templates #17

Open
esthorace opened this issue Dec 17, 2024 · 1 comment
Open

fix comments in templates #17

esthorace opened this issue Dec 17, 2024 · 1 comment

Comments

@esthorace
Copy link

First, congratulations, it's an excellent extension! When I teach, I recommend it to my students. The only problem I find is that when commenting code in Django templates, the code doesn't change to the comment color, as it does with other extensions. It would also be great if you could add simple formatting like the one in djhtml, which simply indents. Thank you very much for your work!

@almahdi404
Copy link
Owner

Glad to see that people are finding it helpful.

To address your first problem,
The django official documentation doesn't use comment color inside comment block({% comment %}{% endcomment %}). Only comment({# #}) syntax has comment color.

And for formatting,
You can use https://github.com/junstyle/prettier-plugin-django, if you are using Prettier. Which is also used in the Django Template Support extension by junstyle.
Currently, I don't think there is any vscode extension for djhtml. And I don't have any plan to work on supporting djhtml in this extension. Because I am building a full-stack framework on top of django called Picomet. Which has its own html based template language.
But if someone sends a pull request for supporting djhtml, I will definitely merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants