mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] owl-vision: syntax scripts, single quotes attributes and slot props highlight and switch below command
This commit adds the following: - Syntax builder scripts to make syntaxes easier to read and edit - Syntax highlight in single quote attributes - Syntax highlight for slot props - Basic syntax highlight for xpaths - Added `Switch Below` command This commit fixes the following: - Using `Switch Besides` or `Switch Below` does not open a new panel if one was already open - Fixed missing space in component's snippet indentation
This commit is contained in:
committed by
Géry Debongnie
parent
398df543fe
commit
34489a2494
@@ -0,0 +1,48 @@
|
||||
import { createTagPattern, exportPatterns } from "./syntax_builder_utils.mjs";
|
||||
import {
|
||||
htmlAttributes,
|
||||
owlAttributesDynamic,
|
||||
owlAttributesFormattedString,
|
||||
owlAttributesStatic,
|
||||
propsAttributes
|
||||
} from "./syntax_parts/owl_attributes.mjs";
|
||||
import { xpathAttributes } from "./syntax_parts/xpath.mjs";
|
||||
|
||||
const componentsTags = createTagPattern("component-tags", {
|
||||
match: "[A-Z][a-zA-Z0-9_]*",
|
||||
name: "entity.name.type.class owl.component",
|
||||
patterns: [
|
||||
owlAttributesDynamic,
|
||||
owlAttributesDynamic,
|
||||
propsAttributes,
|
||||
],
|
||||
});
|
||||
|
||||
const htmlTags = createTagPattern("html-tags", {
|
||||
match: "[a-z][a-zA-Z0-9_:.]+|[abiqsuw]",
|
||||
name: "entity.name.tag.localname.xml owl.xml.tag",
|
||||
patterns: [
|
||||
owlAttributesFormattedString,
|
||||
xpathAttributes,
|
||||
owlAttributesDynamic,
|
||||
owlAttributesStatic,
|
||||
htmlAttributes,
|
||||
],
|
||||
});
|
||||
|
||||
const tTag = createTagPattern("t-tag", {
|
||||
match: "t(?![a-zA-Z])",
|
||||
name: "entity.name.tag.localname.xml owl.tag",
|
||||
patterns: [
|
||||
propsAttributes,
|
||||
owlAttributesFormattedString,
|
||||
owlAttributesDynamic,
|
||||
owlAttributesStatic,
|
||||
],
|
||||
});
|
||||
|
||||
exportPatterns(
|
||||
"L:text.xml -comment",
|
||||
"owl.template",
|
||||
[componentsTags, htmlTags, tTag]
|
||||
);
|
||||
Reference in New Issue
Block a user