Skip to content

Commit

Permalink
Merge pull request #25 from SublimeText/develop
Browse files Browse the repository at this point in the history
Change directive keyword scope
  • Loading branch information
deathaxe authored Nov 21, 2024
2 parents 51d93e5 + d55891b commit 2d5cd90
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Vue Component.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ contexts:
- vue-directive-assignment
# https://vuejs.org/guide/essentials/template-syntax.html#directives
- match: (?i:v-{{vue_directive_char}}+){{vue_directive_break}}
scope: keyword.control.directive.vue
scope: keyword.other.directive.vue
push:
- vue-directive-meta
- vue-directive-assignment
Expand All @@ -679,7 +679,7 @@ contexts:
# `:attr` is short hand form of `v-bind:attr`
# `#attr` is short hand form of `??`
- match: '[@:#]'
scope: keyword.control.directive.vue
scope: keyword.other.directive.vue
push:
- vue-directive-meta
- vue-directive-assignment
Expand Down
18 changes: 9 additions & 9 deletions tests/syntax_test_directive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^ entity.other.attribute-name.html - entity.other entity.other
// ^^^^ keyword.control.directive.vue
// ^^^^ keyword.other.directive.vue
// ^ punctuation.separator.vue
// ^^^^^ variable.parameter.vue
// ^ punctuation.separator.key-value.html
Expand All @@ -96,7 +96,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^ entity.other.attribute-name.html - entity.other entity.other
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^^^^^ variable.parameter.vue
// ^ punctuation.separator.key-value.html
// ^^^^^^^^^^^^^^^ meta.string.html
Expand All @@ -115,7 +115,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^ entity.other.attribute-name.html
// ^^^^ keyword.control.directive.vue
// ^^^^ keyword.other.directive.vue
// ^ punctuation.separator.vue
// ^^^^^^^^^^^ meta.interpolation.vue
// ^ punctuation.section.interpolation.begin.vue
Expand All @@ -130,7 +130,7 @@
<div @[eventName]="doSomething()"></div>
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^ entity.other.attribute-name.html keyword.control.directive.vue
// ^ entity.other.attribute-name.html keyword.other.directive.vue
// ^^^^^^^^^^^ meta.interpolation.vue
// ^ punctuation.section.interpolation.begin.vue
// ^^^^^^^^^ source.js.embedded.vue variable.other.readwrite.js
Expand All @@ -153,7 +153,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^^^^^^ entity.other.attribute-name.html
// ^^^^ keyword.control.directive.vue
// ^^^^ keyword.other.directive.vue
// ^ punctuation.separator.vue
// ^^^^^ variable.parameter.vue
// ^ punctuation.separator.vue
Expand All @@ -169,7 +169,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^^ entity.other.attribute-name.html
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^^^^^ variable.parameter.vue
// ^ punctuation.separator.vue
// ^^^^ constant.other.vue
Expand All @@ -184,7 +184,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^^^^^^^^^^ entity.other.attribute-name.html
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^^^^^ variable.parameter.vue
// ^ punctuation.separator.vue
// ^^^^ constant.other.vue
Expand All @@ -200,7 +200,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ entity.other.attribute-name.html
// ^^^^ keyword.control.directive.vue
// ^^^^ keyword.other.directive.vue
// ^ punctuation.separator.vue
// ^^^^^^^^^^^^^ variable.parameter.vue - punctuation
// ^ punctuation.separator.vue
Expand All @@ -215,7 +215,7 @@
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.directive.html
// ^^^^^^^^^^^^^^^^^^^^^^ entity.other.attribute-name.html
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^^^^^^^^^^^^^ variable.parameter.vue - punctuation
// ^ punctuation.separator.vue
// ^^^^^^^ constant.other.vue
Expand Down
12 changes: 6 additions & 6 deletions tests/syntax_test_mustage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<p #handler="variable">
// ^^^ meta.tag - meta.attribute-with-value
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
// ^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
Expand All @@ -167,7 +167,7 @@
<p #handler='variable'>
// ^^^ meta.tag - meta.attribute-with-value
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
// ^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
Expand All @@ -177,7 +177,7 @@
<p :handler="expression">
// ^^^ meta.tag - meta.attribute-with-value
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
// ^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
Expand All @@ -187,7 +187,7 @@
<p :handler='expression'>
// ^^^ meta.tag - meta.attribute-with-value
// ^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html - meta.string
// ^ keyword.control.directive.vue
// ^ keyword.other.directive.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
// ^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html meta.string.html meta.interpolation.vue source.js.embedded.vue
// ^ meta.tag meta.attribute-with-value.directive.html meta.string.html - meta.interpolation
Expand All @@ -196,7 +196,7 @@

<template #[`content-${variable}`]>
// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html
// ^ entity.other.attribute-name.html keyword.control.directive.vue
// ^ entity.other.attribute-name.html keyword.other.directive.vue
// ^ meta.interpolation.vue punctuation.section.interpolation.begin.vue - source.js.embedded
// ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.vue source.js.embedded.vue - entity.other.attribute-name.html
// ^ meta.interpolation.vue punctuation.section.interpolation.end.vue - source.js.embedded
Expand All @@ -206,7 +206,7 @@
<template v-slot:[`content-${variable}`] >
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.directive.html
// ^^^^^^^ entity.other.attribute-name.html
// ^^^^^^ keyword.control.directive.vue
// ^^^^^^ keyword.other.directive.vue
// ^ meta.interpolation.vue punctuation.section.interpolation.begin.vue - source.js.embedded
// ^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.vue source.js.embedded.vue - entity.other.attribute-name.html
// ^ meta.interpolation.vue punctuation.section.interpolation.end.vue - source.js.embedded
Expand Down

0 comments on commit 2d5cd90

Please sign in to comment.