mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] owl-vision: Autocomplete and added missing owl directives
This commit adds basic autocomplete in xml files. This includes autocompletion for elements, components, props, attributes, and javascript expressions. It also: - Adds "Go To Definition" support for props and javascript expressions in xml - Support for the following directives: t-att, t-model, t-tag, t-debug, t-log - Fixes t-else syntax highlight to be non-dynamic as the attribute value should be empty
This commit is contained in:
committed by
Géry Debongnie
parent
2eb151c92d
commit
55c48b2b12
@@ -4,7 +4,7 @@
|
||||
"description": "Owl framework extension that highlights templates and ease navigation between components and templates.",
|
||||
"publisher": "Odoo",
|
||||
"license": "LGPL-3.0-only",
|
||||
"version": "0.0.2",
|
||||
"version": "0.1.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/odoo/owl/tree/master/tools/owl-vision"
|
||||
@@ -63,6 +63,13 @@
|
||||
"type": "string",
|
||||
"default": "**/node_modules/**,**/lib/**,**/tests/**",
|
||||
"description": "Files to exclude in search"
|
||||
},
|
||||
"owl-vision.autocomplete-mocks": {
|
||||
"order": 2,
|
||||
"type": "string",
|
||||
"editPresentation": "multilineText",
|
||||
"default": "/**\n* @template T\n* @param {T} obj\n* @returns {T}\n*/\nfunction useState(obj) {}\n\n/**\n* @typedef {Object} Ref\n* @property {HTMLElement} el\n*/\n/**\n* @returns {Ref}\n*/\nfunction useRef(name) {}",
|
||||
"description": "Mocks for functions or object that are imported but not resolved by the autcomplete. Add docstring comments for them to work properly."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -128,6 +135,7 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "20.2.5",
|
||||
"@types/vscode": "^1.73.0",
|
||||
"@types/xmldoc": "^1.1.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
||||
"@typescript-eslint/parser": "^5.59.8",
|
||||
"@vscode/test-electron": "^2.3.2",
|
||||
@@ -135,5 +143,8 @@
|
||||
"esbuild": "^0.19.5",
|
||||
"eslint": "^8.41.0",
|
||||
"typescript": "^5.1.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"xmldoc": "^1.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user