javascript-ultimate icon indicating copy to clipboard operation
javascript-ultimate copied to clipboard

Problem with vue files

Open victorwpbastos opened this issue 8 years ago • 12 comments

With this package installed the .vue files are rendered like this:

image

victorwpbastos avatar Feb 21 '17 16:02 victorwpbastos

What language does it display in the very bottom right of Sublime Text?

JoshuaWise avatar Feb 21 '17 16:02 JoshuaWise

It shows Vue Component.

victorwpbastos avatar Feb 22 '17 17:02 victorwpbastos

I can't reproduce the problem you're having. Could you copy-and-paste the entire file here for me to test it?

JoshuaWise avatar Mar 02 '17 01:03 JoshuaWise

Ok. Remember to install the Vue Syntax Highlight package.

<template>
    <div v-if="user">
        <h2>{{ user }}</h2>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                user: 'Admin'
            }
        }
    }
</script>

<style scoped>
    h2 {
        color: red;
    }
</style>

victorwpbastos avatar Mar 08 '17 16:03 victorwpbastos

@victorwpbastos, @JoshuaWise Did you have any method to deal with this? thx a lot

icepole-jon avatar Mar 23 '17 07:03 icepole-jon

@icepole-jon, for now, I disabled the plugin.

victorwpbastos avatar Mar 23 '17 14:03 victorwpbastos

+1. I have Vue Syntax Highlight installed, but I am getting all of those red blocks too. Any way that this can get fixed? I disabled the package for now.

alexbet avatar Mar 23 '17 22:03 alexbet

Enabling the "Javascript" package that this package disables solves the red blocks problem. But, it seems like Sublime needs a few seconds before it can render a Vue file on boot. I will uninstall this package until this problem has been resolved.

alexbet avatar Mar 23 '17 22:03 alexbet

Same issue here.

franciscolourenco avatar Apr 05 '17 22:04 franciscolourenco

With the default Javascript package installed: text.html.vue for <template></template> text.html.vue source.js.embedded.html for <script></script> text.html.vue source.css.embedded.html for <style></style>

franciscolourenco avatar Apr 12 '17 16:04 franciscolourenco

For anyone interested, babel-sublime is working fine with .vue files, after disabling the default Javascript package.

franciscolourenco avatar Apr 12 '17 16:04 franciscolourenco

The problem seems to be caused by the Vue Component syntax not using the proper way of embedding other syntaxes (javascript). I'll see if I can create a PR on their repo to get it fixed.

JoshuaWise avatar Apr 12 '17 18:04 JoshuaWise