diff --git a/package.json b/package.json index 32759c6..49a4218 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "file-types": [ "html" ], - "highlights": "src/highlights.json", "injection-regex": "html" } ] diff --git a/properties/highlights.css b/properties/highlights.css deleted file mode 100644 index 202bf1b..0000000 --- a/properties/highlights.css +++ /dev/null @@ -1,26 +0,0 @@ -@import "./injections.css"; - -tag_name { - highlight: 'tag'; -} - -/* TODO - highlight as an error? */ -erroneous_end_tag_name { - highlight: 'tag'; -} - -doctype { - highlight: 'constant'; -} - -attribute_name { - highlight: 'attribute'; -} - -attribute_value { - highlight: 'string'; -} - -comment { - highlight: 'comment'; -} diff --git a/properties/injections.css b/properties/injections.css deleted file mode 100644 index 36d8657..0000000 --- a/properties/injections.css +++ /dev/null @@ -1,9 +0,0 @@ -script_element { - injection-language: 'javascript'; - injection-content: child(this(), 1); -} - -style_element { - injection-language: 'css'; - injection-content: child(this(), 1); -} diff --git a/queries/highlights.scm b/queries/highlights.scm new file mode 100644 index 0000000..c7e4d0d --- /dev/null +++ b/queries/highlights.scm @@ -0,0 +1,10 @@ +(tag_name) @tag +(erroneous_end_tag_name) @tag.error +(doctype) @constant +(attribute_name) @attribute +(attribute_value) @string +(comment) @comment + +"<" @punctuation.bracket +">" @punctuation.bracket +"