-
Notifications
You must be signed in to change notification settings - Fork 2
Possible features (ongoing) #1
Comments
Holy cow that's quite a list. The original scope of this project was just to add syntax highlighting. It was rather simple to just run Edit: But don't let that dissuade you from updating the list. I can probably do a few of those at some point. |
That's ok :) I'm diving into the building extensions docs too this week. So I will do Pull Requests where I can to help out! :) |
Great. Cheers. |
@atomi Not sure if it automatically picks up updates, but if not so, can you submit release |
Sorry for the late reply (Halloween/Dodgers parties)... But yeah, I need to figure out a way to do CI in the marketplace or add contributors. I'll work on that today. |
@Allendar I believe I added you to the marketplace project on the visualstudio.com site. Since I didn't see an easy way to add CI for the github repo these are the instructions for publishing in the meantime: https://code.visualstudio.com/docs/extensions/publish-extension |
Had two very busy days. Long weekend now. I'll dive into it more tomorrow :) |
@atomi Thanks so much for making this! I never really dived into making VSCode extensions, but this is already so much better than just HTML mapping qtpl file to basic HTML.
Already love the markup. These were some things that instantly popped into my mind;
VSCode Go extension interpreter partially inside the template:
Automatically resolve imports and sort them by name (
{% import "strconv" %}
etc.)Understanding structs/types for auto-completion
Jump to definition when
CMD(CTRL) + Click
on avar/struct/function
Other features:
Logic for the
{% %}
,{%s %}
,{%s= %}
type auto-completion and checking if the type matchesMaking the Extended pages understand what functions they can implement. Say I'm extending a
BasePage
and have aStylesheets
block (function), this could auto-complete while typing{% func (p *ForgotPasswordPage) Stylesheets() %}
. This probably is via{% interface
(Page interface > BasePage struct > ForgotPasswordPage struct
)Automatically generate endings for things like
{% if obj.Something() %}
to pop-in{% endif %}
after. Same for{% for _, user := range p.Users %}
>{% endfor %}
{% func Stylesheets %}{% endfunc %}
auto-completionI have a
helpers.qtpl
file (kind of like Macros in Twig/Django). Reading those function definitions from other qtpl files in the same folder (e.a.{%s= FormEmailField(p.Form.Field("email")) %}
)Make
CMD(CTRL) + /
actually wrap a{% comment %}{% endcomment %}
instead of normal HTML commentingAn action via
SHIFT + CMD(CTRL) + P
to wrap the selected code with{% stripspace %}
Beautification on save (settings to turn behaviour
on/off
) to automatically indent the combination of QuickTemplate and HTML/CSS/JS. Making it honour the normal HTML/CSS/JS indentation and afterwards indenting QuickTemplateif/else
andfor
definitionsForce a newline at the end of each file
I'll keep updating this list for things that I might see.
Thanks again!
The text was updated successfully, but these errors were encountered: