Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eseom/nunjucks-template
This is a vscode extension for nunjucks template language which is also available to all Jinja style templates
https://github.com/eseom/nunjucks-template
jinja2 jinja2-template nodejs nunjucks nunjucks-formatter nunjucks-template template vscode yaml-syntax
Last synced: about 1 month ago
JSON representation
This is a vscode extension for nunjucks template language which is also available to all Jinja style templates
- Host: GitHub
- URL: https://github.com/eseom/nunjucks-template
- Owner: eseom
- Created: 2018-02-06T16:33:54.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T12:06:24.000Z (over 2 years ago)
- Last Synced: 2024-09-27T07:43:27.303Z (about 2 months ago)
- Topics: jinja2, jinja2-template, nodejs, nunjucks, nunjucks-formatter, nunjucks-template, template, vscode, yaml-syntax
- Language: TypeScript
- Homepage:
- Size: 216 KB
- Stars: 40
- Watchers: 2
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# nunjucks-template
This is the Nunjucks-supporting extension for vscode with complete features.
# feature
- nunjucks template syntax
- nunjucks formatter with prettydiff2
- yaml syntax## configurations
- By default, detects .nj, .njk files automatically.
- Additionally, use `files.associations`#### extension's own configurations
```json
"nunjucksTemplate.preserveEmptyLine": 3
```(suggested at issue PR #30 by @sdegutis)
#### other configurations
```json
"files.associations": {
"*.html": "njk"
},
```- For vscode embedded emmet, notify that `njk` is html file type
```json
"emmet.includeLanguages": {
"njk": "html"
},
```- max line length follows standard vscode html.format.wrapLineLength
```json
"html.format.wrapLineLength": 120
```- for vscode-icons ([issue #6](https://github.com/eseom/nunjucks-template/issues/6))
```json
"vsicons.associations.files": [
{ "icon": "nunjucks", "extensions": ["njk"], "format": "svg" }
],
```- for Material Icon Theme by [Heitor Augusto](https://github.com/HeitorAugustoLN)
```json
"material-icon-theme.files.associations": {
"*.html": "nunjucks"
},
```## snippets
| Trigger | Snippet |
| --------- | ----------------------------------- |
| n-extends | {% extends '${name}' %} |
| n-block | {% block ${name} %}{% endblock %} |
| n-if | {% if condition %}{% endif %} |
| n-for | {% for ${condition} %}{% endfor %} |
| n-macro | {% macro ${name}() %}{% endmacro %} |## links
- https://github.com/eseom/nunjucks-template
- https://marketplace.visualstudio.com/items?itemName=eseom.nunjucks-template#overview