Add TSTag and TSTagDelimiter groups

These groups will be added for use with xml-like tags such as html and
jsx.
This commit is contained in:
TravonteD 2020-09-15 22:24:33 -04:00 committed by Thomas Vigouroux
parent b4abf6b07d
commit c366a041c8
3 changed files with 15 additions and 2 deletions

View file

@ -164,6 +164,15 @@ Mainly for markup languages.
@text.uri @text.uri
``` ```
#### Tags
Used for xml-like tags
```
@tag
@tag.delimiter
```
### Locals ### Locals
``` ```

View file

@ -68,6 +68,10 @@ hlmap["text.title"] = "TSTitle"
hlmap["text.literal"] = "TSLiteral" hlmap["text.literal"] = "TSLiteral"
hlmap["text.uri"] = "TSURI" hlmap["text.uri"] = "TSURI"
-- Tags
hlmap["tag"] = "TSTag"
hlmap["tag.delimiter"] = "TSTagDelimiter"
hlmap["none"] = "TSNone" hlmap["none"] = "TSNone"
function M.attach(bufnr, lang) function M.attach(bufnr, lang)

View file

@ -1,4 +1,4 @@
(tag_name) @type (tag_name) @tag
(erroneous_end_tag_name) @error (erroneous_end_tag_name) @error
(doctype) @constant (doctype) @constant
(attribute_name) @property (attribute_name) @property
@ -13,4 +13,4 @@
">" ">"
"</" "</"
"/>" "/>"
] @punctuation.bracket ] @tag.delimiter