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

Syntax highlighting and autocomplete #31

Merged
merged 1 commit into from
Apr 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions QuickTemplate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<filetype binary="false" description="QuickTemplate" name="QuickTemplate">
<highlighting>
<options>
<option name="LINE_COMMENT" value="//" />
<option name="COMMENT_START" value="" />
<option name="COMMENT_END" value="" />
<option name="HEX_PREFIX" value="" />
<option name="NUM_POSTFIXES" value="" />
</options>
<keywords keywords="case;cat;code;collapsespace;comment;default;else;elseif;endcollapsespace;endcomment;endfor;endfunc;endif;endplain;endstripspace;endswitch;for;func;if;import;interface;package;plain;space;stripspace;struct;switch;type" ignore_case="false" />
<keywords3 keywords="{%=;{%=h;{%=j;{%=jh;{%=q;{%=qh;{%=u;{%=uh;{%d;{%d=;{%f;{%f.;{%f.=;{%f=;{%j;{%j=;{%q;{%q=;{%s=;{%u;{%u=;{%uz;{%uz=;{%v;{%v=;{%z;{%z=" />
</highlighting>
<extensionMap>
<mapping ext="qtpl" />
</extensionMap>
</filetype>
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,11 @@ BenchmarkMarshalXMLQuickTemplate1000-4 30000 53000 ns/op 32 B/
* *Is there a syntax highlighting for qtpl files?*

Yes - see [this issue](https://github.com/valyala/quicktemplate/issues/19) for details.
If you are using JetBrains products (syntax highlighting and autocomplete):
* cd [JetBrains settings directory](https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs)
* mkdir -p filetypes && cd filetypes
* curl https://raw.githubusercontent.com/valyala/quicktemplate/master/QuickTemplate.xml >> QuickTemplate.xml
* Restart your IDE

* *I didn't find an answer for my question here*

Expand Down