Giter VIP home page Giter VIP logo

vetur's Introduction

Vetur

Project status

issue: #3476

New official vue editor support: Volar
VSCode extension: https://marketplace.visualstudio.com/items?itemName=Vue.volar
Project: https://github.com/johnsoncodehk/volar
LSP: https://github.com/johnsoncodehk/volar


Vue tooling for VS Code.

  • vls: Vue Language Server
  • vti: Vetur Terminal Interface
  • Docs

🎉 VueConf 2017 Slide & Video 🎉

Sponsors

I quit my job to travel nomadically, to work on Open Source and to conduct independent study/research.

Vetur is my main focus in Open Source. Your help will alleviate my financial burden and allow me to spend more time working on Vetur. Thank you 🙏

https://github.com/sponsors/octref

Thanks to the following companies for supporting Vetur's development:

Request and perform code reviews from inside your IDE. Review any code, even if it's a work-in-progress that hasn't been committed yet, and use jump-to-definition, your favorite keybindings, and other IDE tools. Try it free.
Track and prioritise tech debt and maintenance issues, straight from your IDE. Bookmark code while you work, organise TODOs and share codebase knowledge with your team. Try it out for free today.
Bored of trawling through the docs? Get JS and TS code examples from documentation and Open Source right in your IDE. Learn more.
Tabnine - Code Faster with the All-Language AI Assistant for Code Completion.

Features

Quick Start

  • Install Vetur.
  • Try it with Veturpack.
  • Refer to setup page for setting up.
  • Refer to each feature's own page for setting up specific features.

FAQ

FAQ

Limitations

Roadmap

See #873.

Contribution

See CONTRIBUTING.md

License

MIT © Pine Wu

vetur's People

Contributors

alexandrebonaventure avatar alexsasharegan avatar andrewisaburden avatar cereschen avatar coder-256 avatar dependabot-preview[bot] avatar dependabot[bot] 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  avatar

vetur's Issues

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.

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.

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.

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

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.

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
        }
    }
};

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

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?

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.

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.

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.

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.

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

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
代码格式化如下

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

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:

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 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?

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.

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.

autocomplete

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

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!

vue scss no work

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

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.