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

Typescript backticks color highlighting inside #892

Closed
pitops opened this issue Mar 18, 2016 · 14 comments
Closed

Typescript backticks color highlighting inside #892

pitops opened this issue Mar 18, 2016 · 14 comments

Comments

@pitops
Copy link

pitops commented Mar 18, 2016

I have noticed that when using this with Angular 2 and i write inline templates, there is not syntax coloring everything is in the same color, is there a way to enable coloring inside backticks?


@Component({
  selector: "ng2-app",
  template: `
    <section class="jumbotron full-height">
      <top-navigation></top-navigation>
      <div class="container">
        <router-outlet></router-outlet>
      </div>
    </section>
  `,
  directives: [TopNavigationComponent, ArcListComponent]
})

@colelawrence
Copy link

Backticks are purely a template string, there is no inherent language that is used between backticks. Maybe there is a solution to detecting the language between the ticks, but that may not be desirable to have as an added process.

@albtdd
Copy link

albtdd commented Apr 7, 2016

I think that may be very very desirable to have that feature. I have tried IntelliJ IDEA, that support that feature, and is fantastic. I hope that Atom supported too in the near future.

atom

@pitops
Copy link
Author

pitops commented Apr 7, 2016

@zombiehippie As @albtdd presented, for angular 2 devs it will become a very desirable feature and its frustrating to not have a solution, when phpstorm/webstorm/intelli j idea have it out of the box already. I do not really like those programs as they are more memory heavy and the likes and it would be a very welcome feature if i want to stay with atom. So i hope someone does it a reality.

@colelawrence
Copy link

Very interesting, and cool! It would be neat to have a toggleable syntax
highlighting.

On Thu, 7 Apr 2016, 6:47 AM Petros Kyriakou notifications@github.com
wrote:

@zombiehippie https://github.com/ZombieHippie As @albtdd
https://github.com/albtdd presented, for angular 2 devs it will become
a very desirable feature and its frustrating to not have a solution, when
phpstorm/webstorm/intelli j idea have it out of the box already. I do not
really like those programs as they are more memory heavy and the likes and
it would be a very welcome feature if i want to stay with atom. So i hope
someone does it a reality.


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#892 (comment)

@Deviad
Copy link

Deviad commented Apr 16, 2016

Still waiting for this.

colelawrence added a commit to colelawrence/atom-typescript that referenced this issue Apr 18, 2016
@colelawrence
Copy link

colelawrence commented Apr 18, 2016

Hey @Deviad , I took a swing at this for you as it was an incredibly easy fix, my update is one commit ahead of the latest release tag and I have published my alternative version on atom.

https://atom.io/packages/atom-typescript-zh-backticks

If you use this version, you may need to rename your config keys. I don't very much wish to create a pull request for this, as I'm not entirely sure the way I did it is the "best way".

image

You can see my changes here: master...ZombieHippie:html-backticks

@pitops
Copy link
Author

pitops commented Apr 18, 2016

@zombiehippie can you make this a standalone addon?

@colelawrence
Copy link

@pitops it's possible to release as a language, but I don't have time, and I don't actually know if it would work separated from the main package.

@Deviad
Copy link

Deviad commented Apr 19, 2016

@zombiehippie Hello, thank you very much for the time you've dedicated to this modification. I really appreciate it.

@colelawrence
Copy link

You're welcome, I hope it works without issues. Otherwise, you can probably
patch the original package manually with that comparison I mentioned.

On Tue, 19 Apr 2016, 1:28 PM Davide Pugliese notifications@github.com
wrote:

@zombiehippie https://github.com/ZombieHippie Hello, thank you very
much for the time you've dedicated to this modification. I really
appreciate it. Thank you!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#892 (comment)

@GregOnNet
Copy link
Contributor

Hi,

#948 has added html-syntax-highlighting in Angular 2 Components.

Is this solution suitable for you?

Kinds
Greg

@pitops
Copy link
Author

pitops commented May 20, 2016

yep this can be closed now, at last official support cheers!

@jrwhip
Copy link

jrwhip commented Jun 7, 2018

I am using atom-typescript v12 and it does not appear to have html-sytax-highlighting in components. Has this feature been removed since it was added in v8?

@lierdakil
Copy link
Collaborator

We currently lack resources to support our own grammar fork, and it created conflicts with Atom's bundled typescript grammar. So we ultimately opted to discontinue our grammar and let Atom team handle the grammar on their end. Sorry.

See https://github.com/TypeStrong/atom-typescript/blob/master/docs/faq.md#syntax-highlighting-is-bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants