GithubHelp home page GithubHelp logo

vuejs / vetur Goto Github PK

View Code? Open in Web Editor NEW
5.7K 5.7K 592.0 12.94 MB

Vue tooling for VS Code.

Home Page: https://vuejs.github.io/vetur/

License: MIT License

TypeScript 92.67% Shell 0.05% JavaScript 1.05% Vue 6.23%
hacktoberfest visual-studio-code vscode vue vue-tooling

vetur's People

Contributors

alexandrebonaventure avatar alexsasharegan avatar andrewisaburden avatar coder-256 avatar dependabot-preview[bot] avatar dependabot[bot] avatar euaaaio avatar fuafa avatar herringtondarkholme avatar iwanabethatguy avatar jasonlyu123 avatar jtommy avatar ktsn avatar merceyz avatar nekosaur avatar octref avatar p-kuen avatar pikax avatar rchl avatar sandersn avatar sapphi-red avatar softwaredeveloptam avatar starptech avatar superusercode avatar therealsyler avatar thisismanta avatar triforcely avatar tyankatsu0105 avatar yoyo930021 avatar yukukotani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vetur's Issues

SCSS formatter broken

<template>

</template>

<script>
  // content
</script>

<style lang="scss">
  @import '~styles/main.scss';

  section[role='alert'] {
  @extend .alert;
    @extend .alert-dismissible;
    border-radius: 0;
    margin-bottom: 0;
    background: darken(white, 2);
    border: 0;
    z-index: 1;

    > div {
      @extend .container;
      display: flex;
      flex-direction: row;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-content: stretch;
      align-items: flex-start;

      div {
        order: 0;
        flex: 1 1 auto;
        align-self: auto;
      }
    }

    P:last-of-type {
      @extend .mb-0;
    }
  }
</style>

Format it with shortcut shift+alt+f, scss are not formatted

SCSS Variables & Mixin Highlighting

The highlighting doesn't work for SCSS for the following sample:

<style lang="scss">
  @import "scss/bootstrap/mixins/_buttons.scss";
  $brand-primary: #3c763d !default;
  $btn-primary-color: #fff !default;
  $btn-primary-bg: $brand-primary !default;
  $btn-primary-border: darken($btn-primary-bg, 5%) !default;
  .btn-primary {
    @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
  }
</style>

All shows formatted when in a .scss file

vue scss no work

Disabled vue-snippets,by HTML:
image
Enabled vue-snippets,by HTML:
image
Enabled vue-snippets,by Vue:
image

User Snippets not loading correctly

I've created my own snippet for Vue files, but using this plugin it doesn't load any suggestion. For example, adding this snippet configuration:

    "Vue Template": {
        "prefix": "full",
        "body": [
            "<template>\n",
            "</template>\n",
            "<script>",
            "export default {\n\tname: \"$TM_FILENAME\"\n}",
            "</script>\n",
            "<style lang=\"scss\">\n",
            "</style>"
        ],
        "description": "Vue Template"
    }

user snippet

Indeed, it doesn't show any snippet at all. Only when I manually add the <template>, <script> or <style> tags.

Use pugbeautify for formatting when lang=pug/jade

Visual Studio Code version - 1.8.1
Platform - Windows 8
Vetur version - 0.2.0
Pug beautify version - 1.0.2

Format document option works fine for plain HTML but if I am trying to use lang="pug" for template, it garbles the template.

Before:

<template lang="pug">
    .hello
        h1 {{ msg }}
        h2 Essential Links
        ul
            li: a(href='https://vuejs.org', target='_blank') Core Docs
            li: a(href='https://forum.vuejs.org', target='_blank') Forum
            li: a(href='https://gitter.im/vuejs/vue', target='_blank') Gitter Chat
            li: a(href='https://twitter.com/vuejs', target='_blank') Twitter
            br
            li: a(href='http://vuejs-templates.github.io/webpack/', target='_blank') Docs for This Template
        h2 Ecosystem
        ul
            li: a(href='http://router.vuejs.org/', target='_blank') vue-router
            li: a(href='http://vuex.vuejs.org/', target='_blank') vuex
            li: a(href='http://vue-loader.vuejs.org/', target='_blank') vue-loader
            li: a(href='https://github.com/vuejs/awesome-vue', target='_blank') awesome-vue
</template>

After:

<template lang="pug">
    .hello h1 {{ msg }} h2 Essential Links ul li: a(href='https://vuejs.org', target='_blank') Core Docs li: a(href='https://forum.vuejs.org',
    target='_blank') Forum li: a(href='https://gitter.im/vuejs/vue', target='_blank') Gitter Chat li: a(href='https://twitter.com/vuejs',
    target='_blank') Twitter br li: a(href='http://vuejs-templates.github.io/webpack/', target='_blank') Docs for This Template
    h2 Ecosystem ul li: a(href='http://router.vuejs.org/', target='_blank') vue-router li: a(href='http://vuex.vuejs.org/',
    target='_blank') vuex li: a(href='http://vue-loader.vuejs.org/', target='_blank') vue-loader li: a(href='https://github.com/vuejs/awesome-vue',
    target='_blank') awesome-vue
</template>

I have installed pugbeautify but am not able to figure out how to delegate the document format to pugbeautify from .vue files.

Nested SCSS elements are unstyled

Using vetur 0.3.1

Nesting works on everything but a few elements. div is expected to be pink - like it's parent, but is displayed with no styling.

how to support cssnext syntax

I want syntax hightlight without no lang set. I just use cssnext for nest selectors.

lang="less"
image

hightlight ok.

no lang set

image

error hightlight

Diagnostics/error-checking/linting

VSCode's html does have this capability, like marking errors for CSS in <style>.
Look into how to restore that and extend to SCSS/LESS regions.

support @types intellisense in the .vue file

I hope can get typings like @types/jquery in the vue file.I can get this feature in the js file.but I can't trigger intellisense in the vue file.Will you support this?thank you and best regard

Not highlighting vue-html.

I have .html files set up to use the vue-html language by default. I have my templates in separate .html files. Up until the latest version it worked great. For some reason with latest version (0.3.5) it's not showing any highlighting anymore. I don't have any template tags or anything around the content since it's just straight up .html files.

autocomplete

Is there a way to get a autocomplete html attributes, css/stylus attributes, js?

Add template literal (jsx) support

Is it possible to add syntax highlighting support to template literals when not using .vue files.

{
    template: `
    <div :class="['loading', {'loading-dark': dark, 'loading-small': small}]">
        <i class="fa fa-spinner fa-pulse"></i>
    </div>
    `,
    props: {
        dark: {
            type: Boolean,
            default: false
        },
        small: {
            type: Boolean,
            default: false
        }
    }
};

CompletionProvider / IntelliSense

The current CompletionProvider based VSCode's html extension needs improvement.
This is to write a new CompletionProvider to satisfy the following goals:

  • Scope based IntelliSense:
    Region-based IS is already there (css using css IS, js using js IS). Scope not yet. For example:
    <span v-text="|"></span> here it should suggest all possible values (props, computed props) for the current component.
  • Correct import / export
    • Importing js libs like lodash should add those methods to js region IS.
    • Importing vue files should add component to template, like FooBar.vue -> <foo-bar>.
  • Use SnippetString in CompletionItem to provide Vue API

Things need to look into:

  • Limitations of SnippetString for IS
  • vscode-textmate for getting scope info
  • How to utilize salsa

While doing it, maybe also add a custom Diagnostics that shows error, such as v-if using non-existing prop.

template tag issue

screen shot 2017-02-21 at 11 23 21 am
not highlight after meet template tag which are not the right template tag.

make emmet only invoke in style tag

is there a way , i can use emmet css and emmet html
hand in hand in vue files

if i enable it...
if i try to use emmet for html
i cant get it to work

"emmet.syntaxProfiles": {
        "blade": "html",
        // Activate this if you will Heavily Style
        "vue": "css"
    },

doing something like this
pb!

padding-bottom:  !important;

when i do div.row

display: .row;

so is there a way i can use both emmet css and html
without having conflict?

lets say make the scope only apply to style tag for css
and template tag for html?

ESLint stopped working - how to fix

Hi,

Please add the following to the readme, as it affects users installing this extension who also uses ESLint.

After installing vetur, your .vue files will be mapped to 'vue' type in VSCode, which will break the eslint validation that you may already have for HTML files.

To fix that, add "vue" to the list of types to validate in your settings.json file:

"eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "vue"
  ],

Thanks

HTML language service no longer working

I no longer get autocompletions of tags in vue-html language mode.
Easy test case: type in <ul></ it won't show the auto-close for the ul anymore.
Emmet seems to no longer work either. Typing div.test and pressing tab just inserts a tab.

Comment-toggling is not working

I used ctrl+/ want to annotation that is wrong for template and I key like col-md-3 when key - intellisense hide and scss is the same.
can you fix that.
thank you.

Support for word based suggestion

Hi,

I notice that word based suggestion not enable in .vue file. Really hope it can be done by you as your work is really awesome!

Use Handlebars as starter point

I'm using VS Code built in Handlebars association for .vue files. It's working pretty well (Intellisense and autocomplete included), but comments. I guess would be much simpler use this as a starter point.

Part of the HTML formatting error

Configured according to the readme, can work normally, but properly formatted HTML code

"files.associations": {
  "*.vue": "vue"
}

If not configured above this option, the formatting is normal, but at the same time the CSS properties completely won't appear smart tips
代码格式化如下

Vue highlighting support in Jade/Pug templates

I noticed that in HTML, vetur provides nice Javascript syntax highlighting inside Vue directives and inside {{ }}, etc. in the template. Is there any way to make that also work when using Jade/Pug?

SASS highlighted with CSS grammar

VSCode: 1.9.1
vetur: 0.3.2

Was just messing around with a test project and discovered that SASS is being highlighted with the CSS grammar instead of SASS - even though the correct grammar is defined

<style lang="sass">
  #app
    width: 100vw
    text-align: center
</style>

I.e this works when it shouldn't:

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.