Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdinabox/quicktemplate.vscode
Syntax Highlighting and code (go/html/css) completion for valyala/quicktemplate
https://github.com/jdinabox/quicktemplate.vscode
quicktemplate snippets syntax-highlighting
Last synced: 7 days ago
JSON representation
Syntax Highlighting and code (go/html/css) completion for valyala/quicktemplate
- Host: GitHub
- URL: https://github.com/jdinabox/quicktemplate.vscode
- Owner: JDinABox
- License: mit
- Created: 2020-10-13T03:12:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T13:40:09.000Z (about 3 years ago)
- Last Synced: 2024-03-02T00:35:35.255Z (9 months ago)
- Topics: quicktemplate, snippets, syntax-highlighting
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=jdinabox.quicktemplate-vscode
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang QuickTemplate
QuickTemplate syntax highlighting and code competition
## Features
- QuickTemplate Snippets
- Code Completion:
- Go
- Html
- CSS
- Syntax Highlighting
- QuickTemplate
- Go
- Html
- CSS
- JavaScript## Snippets
Note: From snippets/qtpl.json file [^regex]
| Prefix | Body | Notes |
| ----------- | ----------- | ----------- |
| {% | "{% $0 %}" | Doesn't really work ( auto closes w/ autoClosingPairs) |
| cat | "{% cat \"${0:path}\" %}" |
| code | ["{% code","$0","%}"] |
| collapsespace | ["{% collapsespace %}", "\t$0", "{% endcollapsespace %}"] |
| comment | ["{% comment %}", "\t$0", "{% endcomment %}"] |
| else | "{% else %}$0" |
| elseif | "{% elseif $1 %}$0" |
| for | ["{% for ${1:i} := ${2:0}; $1 < ${3:n}; $1++ %}", "\t$0", "{% endfor %}"] |
| func | ["{% func $1($2) %}", "\t$0", "{% endfunc %}"] |
| if | ["{% if $1 %}", "\t$0", "{% endif %}"] |
| ifelse | ["{% if $1 %}", "\t$2", "{% else %}", "$0", "{% endif %}"] |
| import | "{% import \"$0\" %}" |
| interface | ["{% interface ${1:name} {", "\t$0", "} %}"] |
| switch | ["{% switch $1 %}", "{% case $2 %}","$0","${3:{% default %\\}\n}","{% endswitch %}"] |
| stripspace | ["{% stripspace %}", "\t$0", "{% endstripspace %}"] |## Known Issues
No javascript completion
Html & CSS code completion is copied from [vscode-extension-samples](https://github.com/microsoft/vscode-extension-samples)/[lsp-embedded-language-service](https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-embedded-language-service)
----
### Release Notes
#### 20/4/21 (1.1.0)
Add:
- Optional trim whitespace modifier(-) to syntax ([#1](https://github.com/JDinABox/quicktemplate.vscode/pull/1)) [@muthukrishnan24](https://github.com/muthukrishnan24)
Fix
- Stripspace snippet
#### 13/10/20 (1.0.2)
Update Repository... Again
#### 12/10/20 (1.0.1)
Update Repository
#### 12/10/20 (1.0.0)
Initial release of qtpl
[^regex]: Regex: /^ +("([A-z ]+)": {\n) +("prefix": "([A-z0-9\{% ]+)",\n) +("body": (.*)\n) +(},?)/gm
Replacer: | $4 | $6 |