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

Haml support - Colorization #739

Closed
ycrepeau opened this issue Mar 22, 2018 · 3 comments
Closed

Haml support - Colorization #739

ycrepeau opened this issue Mar 22, 2018 · 3 comments
Labels

Comments

@ycrepeau
Copy link

My *.vue files contains three parts:

  • template (using haml)
  • script (using coffeescript)
  • style (using sass, not scss)

Script and style sections are properly colorized.
The template section is not.

Is it possible to add proper colorization (highlight) to code written in haml ?

@HerringtonDarkholme
Copy link
Member

It looks like we cannot support arbitrary language highlighting in vue file. Even custom blocks have only predefined language support.

https://github.com/vuejs/vetur/blob/master/package.json#L91

@octref any idea to break the limit?

@ZSkycat
Copy link

ZSkycat commented Apr 28, 2018

Maybe consider splitting the code into multiple files
like this:

// ./hello.vue.js
// ./hello.vue.html
// ./hello.vue.css

import template from "./hello.vue.html";

export default {
    name: "Hello",
    render: template,
};

@octref
Copy link
Member

octref commented May 15, 2018

We can add haml in the embeddedLanguages in package.json. If users install haml extension it'll become available.

image

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

No branches or pull requests

4 participants