Code Monkey home page Code Monkey logo

vscode-quicktemplate's Introduction

Hi there ๐Ÿ‘‹

  • ๐ŸŒต Nothing serious.
  • VSCode

vscode-quicktemplate's People

Contributors

atomi avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ardikaveh

vscode-quicktemplate's Issues

Possible features (ongoing)

@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 a var/struct/function

  • Other features:

  • Logic for the {% %}, {%s %}, {%s= %} type auto-completion and checking if the type matches

  • Making the Extended pages understand what functions they can implement. Say I'm extending a BasePage and have a Stylesheets 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-completion

  • I 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 commenting

  • An 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 QuickTemplate if/else and for definitions

  • Force a newline at the end of each file

I'll keep updating this list for things that I might see.

Thanks again!

HTML doesn't auto-complete anymore

As I'm diving more into extension/language building for VSCode I couldn't find out yet why the HTML tags on tab-hit don't complete anymore. It also seems that any intelligence towards HTML is gone.

Maybe need to look into the Laravel Blade extension to see how it combines HTML + Blade syntax in one file.

I'll try to research it soon too, but maybe you might find a solution before that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.