ux-language-features (Uxls)
⚡ Fast ux Language Support Extension support quickapp and vela
Using
- use
npm i -D ux-types
to add ux-types
This extension required ux types from the ux-types
.
The latest version of Aiot-IDE generates projects with ux-types
installed by default, if not in your project, please install it by yourself : npm i -D ux-types
// package.json
{
"devDependencies": {
"ux-types": "latest"
}
}
⚠️ Uxls only has a "whole document formatter" and cannot format arbitrary ranges.
As a result, only the Format Document command is available.
The Format Selection command does not work.
👉 Uxls use prettier as the formating engine.
So you can use a .prettierrc
or .prettierrc.json
file to customize formatting rules.
example:
// in your .prettierrc file
{
"semi": true,
"singleQuote": false,
"printWidth": 80,
"tabWidth": 2,
"useTabs": true,
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css"
}
more info to prettier
Note
❌ Do not use Object.assign()
when define components
export default Object.assing({},mixin,{
props:['a'],
private:{
msg:'do not code like this'
},
someMethods(){
console.log(this.msg)
}
})
Such code can not get the code completion and error prompts provided by the plugin
💌 Thanks for volar
Thanks to the Volar, ux-language-features is inspired by Volar