-
Notifications
You must be signed in to change notification settings - Fork 36
Support for Vue.js #50
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
Comments
Could you help me summarize some data, sample here |
Sure. Vue components are mashed up in a template, script tag and css. Simple example below: <style>
.js-spinner {
position: absolute;
}
</style>
<template>
<div style="position:relative">
<div class="js-spinner" id="loadSpinner" v-el:spinner></div>
</div>
</template>
<script>
export default {
name: 'SpinLoader',
props: {
loading: {
type: Boolean,
default: true
},
position: {
type: String,
default: 'absolute'
}
},
ready: function() {
this.startSpinner();
},
data() {
return {
spinner: {},
}
}
}
</script> The JS in the script tags are pretty much spot on already. I'll list the custom elements that can be attached in the templates below: Class binding
Short hand of above (true for all Array syntax
Style binding
Above Conditionalsv-if<h1 v-if="ok">Yes</h1>
<h1 v-else>No</h1> v-show
There are a lot more, of course, they're all pretty well documented. VueJS docs Do you need more or have I misunderstood what you wanted in the first place? 😄 |
If you just want support for the .vue specific case (its just that it has more than 1 file context, e.g. template, style, script) you can use https://github.com/posva/vim-vue which will split those apart and let vim handle the blocks in their respective language. (as far is I understood - no vim pro here) The completion for the html-custom-attribs and all omni completion stuff however would be needed to get implemented via another plugin, like the current one this issue is opened in. So a list of all custom html attributes in their variations would be needed. Also the methods/interfaces the Vue class offers. (e.g. methods, utils, ...). |
I think @Blackskyliner's suggestion is very good. |
Would be nice to add suport for Vue.js
The text was updated successfully, but these errors were encountered: