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

Extend Typescript formatter to be aware of inline html/css in decorators #77442

Closed
jpike88 opened this issue Jul 16, 2019 · 1 comment
Closed
Assignees
Labels
*extension-candidate Issue identified as good extension implementation typescript Typescript support issues

Comments

@jpike88
Copy link

jpike88 commented Jul 16, 2019

@Component({
    template: `<div>
        <p>This is my template</p>
</div>`,
        styles:[`
        .classExample{
            color:black;
        }
`
})

This kind of code does not highlight correctly in TypeScript, I have to use https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline...

Also, auto-format doesn't affect the html or css present in the decorator either. Apparently this is a limitation of VSCode/Typescript formatter:

stringham/angular-template-formatter#7 (comment)

Makes sense to extend the TypeScript formatter to create a smoother experience when working with decorators containing html/css.

@vscodebot vscodebot bot added the typescript Typescript support issues label Jul 16, 2019
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Jul 20, 2019
@vscodebot
Copy link

vscodebot bot commented Jul 20, 2019

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jul 20, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants