Skip to content

Commit

Permalink
feat(tags and attributes): added missing angular material and cdk tag…
Browse files Browse the repository at this point in the history
…s and improved attributes

added $ (observable) visual differentiation for let- and ref- attributes
  • Loading branch information
ghaschel committed Jun 8, 2022
1 parent 9a45cd4 commit 5789d20
Show file tree
Hide file tree
Showing 7 changed files with 1,047 additions and 866 deletions.
38 changes: 19 additions & 19 deletions src/repository/tags/tag-definition.json5
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
repository: {
'tag-definition': {
"tag-definition": {
beginCaptures: {
'4': {
name: 'entity.name.tag.other.html'
"4": {
name: "entity.name.tag.other.html",
},
'3': {
name: 'constant.character.entity.ng-html'
"3": {
name: "constant.character.entity.ng-html",
},
"1": {
name: "punctuation.definition.tag.begin.html",
},
'1': {
name: 'punctuation.definition.tag.begin.html'
}
},
patterns: [
{
include: '#tag-stuff'
}
include: "#tag-stuff",
},
],
begin: '(</?)((ng-container|ng-content|ng-template|router-outlet|mat-accordion|mat-action-list|mat-action-row|mat-autocomplete|mat-card-actions|mat-card-content|mat-card-header|mat-card-footer|mat-card-subtitle|mat-card-title-group|mat-card-title|mat-card|mat-checkbox|mat-chip-list|mat-datepicker-toggle|mat-datepicker|mat-drawer-content|mat-drawer|mat-divider|mat-error|mat-expansion-panel-header|mat-expansion-panel|mat-form-field|mat-grid-list|mat-grid-tile-footer|mat-grid-tile-header|mat-grid-title|mat-hint|mat-icon|mat-label|mat-list-item|mat-list-option|mat-list|mat-menu|mat-nav-list|mat-optgroup|mat-option|mat-panel-description|mat-panel-title|mat-radio-button|mat-radio-group|mat-selection-list|mat-select-trigger|mat-select|mat-sidenav-content|mat-sidenav-container|mat-sidenav|mat-slide-toggle|mat-slider|mat-toolbar-row|mat-toolbar|mat-horizontal-stepper|mat-step|mat-vertical-stepper|mat-tab-group|mat-tab|mat-nav-tab-bar|mat-tree-node|mat-tree|mat-nested-tree-node|mat-button-toggle-group|mat-button-toggle|mat-chip-list|mat-chip|mat-basic-chip|mat-progress-spinner|mat-spinner|mat-progress-bar|mat-dialog-content|mat-dialog-actions|mat-paginator|mat-text-column|mat-header-row|mat-header-cell|mat-table|mat-cell|mat-row|cdk-step|cdk-virtual-scroll-viewport|cdk-header-cell|cdk-cell|cdk-table|cdk-header-row|cdk-row|cdk-tree-node|cdk-tree|cdk-nested-tree-node|mat-pseudo-checkbox)|([a-zA-Z0-9:-]+))\\b',
begin: "(</?)((cdk-accordion-item|cdk-accordion|cdk-cell|cdk-footer-cell|cdk-footer-row|cdk-header-cell|cdk-header-row|cdk-nested-tree-node|cdk-row|cdk-step|cdk-table|cdk-tree-node|cdk-tree|cdk-virtual-scroll-viewport|mat-accordion|mat-action-list|mat-action-row|mat-autocomplete|mat-basic-chip|mat-button-toggle-group|mat-button-toggle|mat-calendar|mat-card-actions|mat-card-content|mat-card-footer|mat-card-header|mat-card-subtitle|mat-card-title|mat-card-title-group|mat-card|mat-cell|mat-checkbox|mat-chip-avatar|mat-chip-list|mat-chip|mat-date-range-input|mat-date-range-picker|mat-datepicker-actions|mat-datepicker-toggle|mat-datepicker|mat-dialog-actions|mat-dialog-content|mat-divider|mat-drawer-content|mat-drawer-container|mat-drawer|mat-error|mat-expansion-panel-header|mat-expansion-panel|mat-form-field|mat-grid-tile-footer|mat-grid-tile-header|mat-grid-tile|mat-grid-list|mat-grid-title|mat-header-cell|mat-header-row|mat-hint|mat-horizontal-stepper|mat-icon|mat-label|mat-list-item|mat-list-option|mat-list|mat-menu|mat-nav-list|mat-nav-tab-bar|mat-nested-tree-node|mat-optgroup|mat-option|mat-paginator|mat-panel-description|mat-panel-title|mat-progress-bar|mat-progress-spinner|mat-pseudo-checkbox|mat-radio-button|mat-radio-group|mat-row|mat-select-trigger|mat-selection-list|mat-select|mat-sidenav-container|mat-sidenav-content|mat-sidenav|mat-slide-toggle|mat-slider|mat-spinner|mat-stepper|mat-step|mat-tab-group|mat-tab-nav-panel|mat-tab|mat-table|mat-text-column|mat-toolbar-row|mat-toolbar|mat-tree-node|mat-tree|mat-vertical-stepper|ng-container|ng-content|ng-template|router-outlet)|([a-zA-Z0-9:-]+))\\b",
endCaptures: {
'1': {
name: 'punctuation.definition.tag.end.html'
}
"1": {
name: "punctuation.definition.tag.end.html",
},
},
end: '(/?>)',
name: 'template.ng.tag'
}
}
}
end: "(/?>)",
name: "template.ng.tag",
},
},
}
38 changes: 19 additions & 19 deletions src/repository/tags/tag-generic-attribute.json5
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
repository: {
'tag-generic-attribute': {
name: 'string.quoted.double.html',
"tag-generic-attribute": {
name: "string.quoted.double.html",
beginCaptures: {
'2': {
"2": {
// using another scope different from the one it fits to differentiate in color from objects and variables
name: 'support.type.object.html-attribute'
name: "support.type.object.html-attribute",
},
'3': {
name: 'constant.character.entity.html'
"3": {
name: "constant.character.entity.html",
},
"4": {
name: "string.quoted.double.html",
},
'4': {
name: 'string.quoted.double.html'
}
},
endCaptures: {
'1': {
name: 'string.quoted.double.html'
}
"1": {
name: "string.quoted.double.html",
},
},
begin: '(?!(DOMMenuItemActive|DOMMenuItemInactive|DOMMouseScroll|onabort|onafterprint|onafterupdate|onbeforecopy|onbeforecut|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onblur|onbounce|onbroadcast|oncanplay|oncanplaythrough|oncellchange|onchange|onclick|onclose|oncommand|oncommandupdate|oncontextmenu|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondblclick|ondrag|ondragdrop|ondragend|ondragenter|ondragexit|ondraggesture|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|onerror|onerrorupdate|onfilterchange|onfinish|onfocus|onformchange|onforminput|ongotpointercapture|onhelp|oninput|oninvalid|onkeydown|onkeypress|onkeyup|onload|onloadeddata|onloadedmetadata|onloadstart|onlosecapture|onlostpointercapture|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onmousewheel|onoverflow|onoverflowchanged|onpaste|onpause|onplay|onplaying|onpointercancel|onpointerdown|onpointerenter|onpointerleave|onpointermove|onpointerout|onpointerover|onpointerup|onpopuphidden|onpopuphiding|onpopupshowing|onpopupshown|onprogress|onpropertychange|onratechange|onreadystatechange|onreset|onresize|onrowenter|onrowexit|onrowinserted|onrowsdelete|onscroll|onseeked|onseeking|onselect|onselectstart|onshow|onstalled|onstart|onstop|onsubmit|onsuspend|ontimeupdate|onunderflow|onunload|onvolumechange|onwaiting|style|let\\-|ref\\-)\\b)\\b([\\w\\-\\_]+)(=)(")',
begin: '(?!(DOMMenuItemActive|DOMMenuItemInactive|DOMMouseScroll|onabort|onafterprint|onafterupdate|onbeforecopy|onbeforecut|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onblur|onbounce|onbroadcast|oncanplay|oncanplaythrough|oncellchange|onchange|onclick|onclose|oncommand|oncommandupdate|oncontextmenu|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondblclick|ondrag|ondragdrop|ondragend|ondragenter|ondragexit|ondraggesture|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|onerror|onerrorupdate|onfilterchange|onfinish|onfocus|onformchange|onforminput|ongotpointercapture|onhelp|oninput|oninvalid|onkeydown|onkeypress|onkeyup|onload|onloadeddata|onloadedmetadata|onloadstart|onlosecapture|onlostpointercapture|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onmousewheel|onoverflow|onoverflowchanged|onpaste|onpause|onplay|onplaying|onpointercancel|onpointerdown|onpointerenter|onpointerleave|onpointermove|onpointerout|onpointerover|onpointerup|onpopuphidden|onpopuphiding|onpopupshowing|onpopupshown|onprogress|onpropertychange|onratechange|onreadystatechange|onreset|onresize|onrowenter|onrowexit|onrowinserted|onrowsdelete|onscroll|onseeked|onseeking|onselect|onselectstart|onshow|onstalled|onstart|onstop|onsubmit|onsuspend|ontimeupdate|onunderflow|onunload|onvolumechange|onwaiting|style|let\\-|ref\\-)\\b)\\b([\\w\\-\\_$]+)(=)(")',
end: '(")',
patterns: [
{
include: '#angular-interpolations'
}
]
}
}
}
include: "#angular-interpolations",
},
],
},
},
}
40 changes: 23 additions & 17 deletions src/repository/tags/tag-minified-boolean-attributes.json5
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
{
repository: {
'tag-minified-boolean-attributes': {
"tag-minified-boolean-attributes": {
captures: {
'1': {
name: 'string.regexp'
"1": {
name: "string.regexp",
},
'2': {
name: 'keyword.operator.expression.let.js'
"2": {
name: "keyword.operator.expression.let.js",
},
'3': {
name: 'support.type.object.html-attribute'
"3": {
name: "support.type.object.html-attribute",
},
'4': {
name: 'string.regexp'
"4": {
name: "constant.character.entity.html",
},
'5': {
name: 'support.type.object.html-attribute'
"5": {
name: "string.regexp",
},
'6': {
name: 'support.type.object.html-attribute'
"6": {
name: "support.type.object.html-attribute",
},
"7": {
name: "constant.character.entity.html",
},
"8": {
name: "support.type.object.html-attribute",
},
},
match: '(?<!<|\\/)(\\*)+?|(let\\-)+?(\\b[\\w\\-\\:]+)\\b\\s?(?!=)|(ref\\-)+?(\\b[\\w\\-\\:]+)\\b\\s?(?!=)|(\\b[\\w\\-\\:]+)\\b\\s?(?!=)',
name: 'punctuation.definition.tag.end.html'
}
}
match: "(?<!<|\\/)(\\*)+?|(let\\-)+?(\\b[\\w\\-\\:]+)\\b\\s?([$])*(?!=)|(ref\\-)+?(\\b[\\w\\-\\:]+)\\b\\s?([$])*(?!=)|(\\b[\\w\\-\\:]+)\\b\\s?(?!=)",
name: "punctuation.definition.tag.end.html",
},
},
}
48 changes: 25 additions & 23 deletions src/repository/tags/tag-prefixed-attribute.json5
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
{
repository: {
'tag-prefixed-attribute': {
name: 'string.quoted.double.html',
"tag-prefixed-attribute": {
name: "string.quoted.double.html",
beginCaptures: {
'2': {
name: 'keyword.operator.expression.let.js'
"2": {
name: "keyword.operator.expression.let.js",
},
'3': {
name: 'string.regexp'
"3": {
name: "string.regexp",
},
'4': {
"4": {
// using another scope different from the one it fits to differentiate in color from objects and variables
name: 'support.type.object.html-attribute'
name: "support.type.object.html-attribute",
},
'5': {
name: 'constant.character.entity.html'
"5": {
name: "constant.character.entity.html",
},
"6": {
name: "constant.character.entity.html",
},
"7": {
name: "string.quoted.double.html",
},
'6': {
name: 'string.quoted.double.html'
}
},
endCaptures: {
'1': {
name: 'string.quoted.double.html'
}
"1": {
name: "string.quoted.double.html",
},
},
begin: '((let\\-)|(ref\\-))\\b([\\w\\-\\_]+)(=)(")',
begin: '((let\\-)|(ref\\-))\\b([\\w\\-\\_]+)([$]*)(=)(")',
end: '(")',
patterns: [
{
include: '#angular-expression'
}
]
}
}
include: "#angular-expression",
},
],
},
},
}

Loading

0 comments on commit 5789d20

Please sign in to comment.