Adds Nunjucks formatted comment regardless
This package applies Nunjucks-formatted comments to *.html and *.php file types.
For example, Toggle Comments applied via default keyboard binding or command prints comments as {# … #} instead of <!-- … -->. Some its own snippets can override the default snippets. In this case, the Toggle Comments.
Regardless, Nunjucks-formatted comments should only be printed according to the appropriate file type.
So, how can this problem be fixed if we want nunjucks-formatted comments in *.njk files, but also want html-styled comments in *.html and *.php files?
I am having the same problem.
You can solve this problem by changing the scope value in the comment settings file(nunjucks-extended/Preferences/Comments.tmPreferences):
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.njk</string>
<key>settings</key>
To do this:
- Extract "Comments.tmPreferences" file from "nunjucks-extended" with PackageResourceViewer
- Change the seventh line as above
or manually:
- Create directories "nunjucks-extended/Preferences/" in the packages directory(Sublime menu -> Preferences ->Browse Packages)
- Download "Comments.tmPreferences" from github
- Change the seventh line as above
- Save the file to a previously created folder(Sublime Text 3/Packages/nunjucks-extended/Preferences/)