fix: fixed the html highlights

This commit is contained in:
Hayden Hargreaves 2026-04-07 19:37:27 -07:00
parent 6034e44364
commit 76f949a6b2
2 changed files with 16 additions and 6 deletions

View File

@ -17,15 +17,15 @@ func CaptureStyle(base lipgloss.Style, capture string) lipgloss.Style {
return base.Foreground(lipgloss.Color("#61afef")) return base.Foreground(lipgloss.Color("#61afef"))
case "function.builtin", "constructor", "keyword.return": case "function.builtin", "constructor", "keyword.return":
return base.Foreground(lipgloss.Color("#ff5f5f")) return base.Foreground(lipgloss.Color("#ff5f5f"))
case "type", "type.builtin", "type.definition": case "type", "type.builtin", "type.definition", "tag.attribute", "tag.attribute.url":
return base.Foreground(lipgloss.Color("#e5c07b")) return base.Foreground(lipgloss.Color("#e5c07b"))
case "string", "string.escape": case "string", "string.escape":
return base.Foreground(lipgloss.Color("#98c379")) return base.Foreground(lipgloss.Color("#98c379"))
case "number", "number.float", "boolean", "constant", "constant.builtin": case "number", "number.float", "boolean", "constant", "constant.builtin", "string.special.url":
return base.Foreground(lipgloss.Color("#56b6c2")) return base.Foreground(lipgloss.Color("#56b6c2"))
case "operator", "punctuation.delimiter", "punctuation.bracket": case "operator", "punctuation.delimiter", "punctuation.bracket", "string.special":
return base.Foreground(lipgloss.Color("#d19a66")) return base.Foreground(lipgloss.Color("#d19a66"))
case "comment", "comment.documentation": case "comment", "comment.documentation", "tag.delimiter":
return base.Foreground(lipgloss.Color("#7f848e")) return base.Foreground(lipgloss.Color("#7f848e"))
case "variable.parameter": case "variable.parameter":
return base.Foreground(lipgloss.Color("#dcdfe4")).Italic(true) return base.Foreground(lipgloss.Color("#dcdfe4")).Italic(true)
@ -34,9 +34,9 @@ func CaptureStyle(base lipgloss.Style, capture string) lipgloss.Style {
} }
switch baseName { switch baseName {
case "keyword": case "keyword", "tag":
return base.Foreground(lipgloss.Color("#c678dd")) return base.Foreground(lipgloss.Color("#c678dd"))
case "function": case "function", "markup":
return base.Foreground(lipgloss.Color("#61afef")) return base.Foreground(lipgloss.Color("#61afef"))
case "type": case "type":
return base.Foreground(lipgloss.Color("#e5c07b")) return base.Foreground(lipgloss.Color("#e5c07b"))

View File

@ -95,6 +95,10 @@
(attribute_value) @string.special.url)) (attribute_value) @string.special.url))
(#any-of? @_attr "href" "src")) (#any-of? @_attr "href" "src"))
((attribute
(attribute_name) @tag.attribute.url)
(#any-of? @tag.attribute.url "href" "src"))
[ [
"<" "<"
">" ">"
@ -103,3 +107,9 @@
] @tag.delimiter ] @tag.delimiter
"=" @operator "=" @operator
(doctype) @constant
"<!" @tag.delimiter
(entity) @character.special