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
@@ -62,7 +62,6 @@ export const propsAttributes = createAttributePatterns("props-attributes", {
|
||||
export const owlAttributesDynamic = createAttributePatterns("owl-attributes-dynamic", {
|
||||
match: [
|
||||
"t-if",
|
||||
"t-else",
|
||||
"t-elif",
|
||||
"t-foreach",
|
||||
"t-as",
|
||||
@@ -75,6 +74,10 @@ export const owlAttributesDynamic = createAttributePatterns("owl-attributes-dyna
|
||||
"t-value",
|
||||
"t-portal",
|
||||
"t-slot-scope",
|
||||
"t-att",
|
||||
"t-tag",
|
||||
"t-log",
|
||||
"t-model",
|
||||
"t-att-[a-z_:.-]+",
|
||||
"t-on-[a-z_:.-]+"
|
||||
].join("|"),
|
||||
@@ -86,12 +89,13 @@ export const owlAttributesDynamic = createAttributePatterns("owl-attributes-dyna
|
||||
export const owlAttributesStatic = createAttributePatterns("owl-attributes-static", {
|
||||
match: [
|
||||
"t-name",
|
||||
"t-else",
|
||||
"t-ref",
|
||||
"t-set-slot",
|
||||
"t-model",
|
||||
"t-inherit",
|
||||
"t-inherit-mode",
|
||||
"t-translation"
|
||||
"t-translation",
|
||||
"t-debug",
|
||||
].join("|"),
|
||||
attributeName: "owl.attribute owl.attribute.static",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user