Skip to content

Commit 8925ec5

Browse files
author
deathaxe
committed
Restrict type/lang attribute completions
This commit restricts completions to `text.html.coffee` so every html dialect can specify its own set of supported languages without creating duplicate completions.
1 parent 290504b commit 8925ec5

3 files changed

+3
-3
lines changed

HTML (CoffeeScript).sublime-syntax

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ contexts:
2929
script-lang-attribute-value:
3030
- meta_include_prototype: false
3131
- meta_scope: meta.tag.script.begin.html meta.attribute-with-value.lang.html
32-
- match: (?=(?i:coffee{{unquoted_attribute_break}}|'coffee'|"coffee"))
32+
- match: (?=(?i:coffee(?:script)?{{unquoted_attribute_break}}|'coffee(?:script)?'|"coffee(?:script)?"))
3333
set:
3434
- script-coffee
3535
- tag-lang-attribute-meta

Script Lang Values.sublime-completions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"scope": "text.html meta.tag.script meta.attribute-with-value.lang",
2+
"scope": "text.html.coffee meta.tag.script meta.attribute-with-value.lang",
33
"completions": [
44
{
55
"trigger": "coffee",

Script Type Values.sublime-completions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"scope": "text.html meta.tag.script meta.attribute-with-value.type",
2+
"scope": "text.html.coffee meta.tag.script meta.attribute-with-value.type",
33
"completions": [
44
{
55
"trigger": "application/coffee",

0 commit comments

Comments
 (0)