From 0e7156e20c0af9cbc9aa751132b0bd9578fb1fb0 Mon Sep 17 00:00:00 2001 From: Max Miliano Date: Wed, 30 Oct 2024 10:23:55 -0300 Subject: [PATCH] fix: html tags and attributes --- colors/dracula-soft.lua | 130 +++++++++++++++++++++++----------------- colors/dracula.lua | 5 +- 2 files changed, 77 insertions(+), 58 deletions(-) diff --git a/colors/dracula-soft.lua b/colors/dracula-soft.lua index 6127b66..665e85b 100644 --- a/colors/dracula-soft.lua +++ b/colors/dracula-soft.lua @@ -81,7 +81,7 @@ end hl(0, 'ColorColumn', { bg = colors.base04 }) hl(0, 'Conceal', { fg = colors.base02 }) hl(0, 'CurSearch', { fg = colors.red, bg = colors.shade_red }) -hl(0, 'Cursor', { fg = colors.base03, bg = colors.cyan }) +hl(0, 'Cursor', { fg = colors.base03, bg = colors.purple }) hl(0, 'lCursor', { link = 'Cursor' }) hl(0, 'CursorIM', { link = 'Cursor' }) hl(0, 'CursorColumn', { link = 'ColorColumn' }) @@ -93,7 +93,7 @@ hl(0, 'DiffDelete', { fg = colors.git_removed, reverse = true }) hl(0, 'DiffText', { fg = colors.cyan, reverse = true }) hl(0, 'EndOfBuffer', { fg = colors.base03 }) hl(0, 'TermCursor', { link = 'Cursor' }) -hl(0, 'TermCursorNC', { fg = colors.base0, reverse = true }) +hl(0, 'TermCursorNC', { link = 'Cursor' }) hl(0, 'ErrorMsg', { fg = colors.diag_error }) hl(0, 'Folded', { fg = colors.base0, bg = colors.base02 }) @@ -152,6 +152,8 @@ hl(0, 'Number', { link = 'Constant' }) hl(0, 'Boolean', { link = 'Constant' }) hl(0, 'Float', { link = 'Constant' }) hl(0, 'Identifier', { fg = colors.base0 }) +hl(0, 'Parameter', { fg = colors.orange }) +hl(0, 'Property', { fg = colors.base0 }) hl(0, 'Function', { fg = colors.green }) hl(0, 'Statement', { fg = colors.pink }) hl(0, 'Conditional', { link = 'Statement' }) @@ -172,6 +174,8 @@ hl(0, 'Typedef', { link = 'Statement' }) hl(0, 'Special', { fg = colors.red }) hl(0, 'SpecialChar', { fg = colors.purple }) hl(0, 'Tag', { fg = colors.pink }) +hl(0, 'TagAttribute', { fg = colors.pink }) +hl(0, 'TagDelimiter', { fg = colors.green }) hl(0, 'Delimiter', { fg = colors.base0 }) hl(0, 'SpecialComment', { fg = colors.pink }) hl(0, 'Debug', { fg = colors.pink }) @@ -184,52 +188,58 @@ if config.plugins['nvim-treesitter'] then hl(0, '@variable', { link = 'Identifier' }) hl(0, '@variable.builtin', { link = 'Constant' }) hl(0, '@variable.parameter', { link = 'Parameter' }) - hl(0, '@variable.member', { fg = colors.base0 }) + hl(0, '@variable.member', { link = 'Property' }) + hl(0, '@property', { link = 'Property' }) + hl(0, '@property.json', { fg = colors.cyan }) + hl(0, '@property.yaml', { fg = colors.cyan }) hl(0, '@constant', { link = 'Constant' }) - hl(0, '@constant.builtin', { fg = colors.purple }) - hl(0, '@constant.macro', { fg = colors.purple }) - hl(0, '@module', { fg = colors.base0 }) - hl(0, '@module.builtin', { fg = colors.purple }) - hl(0, '@label', { fg = colors.pink }) + hl(0, '@constant.builtin', { link = 'Constant' }) + hl(0, '@constant.macro', { link = 'Constant' }) + hl(0, '@constant.html', { link = 'Tag' }) + hl(0, '@module', { link = 'Type' }) + hl(0, '@module.builtin', { link = 'Constant' }) + hl(0, '@label', { link = 'Statement' }) hl(0, '@string', { link = 'String' }) - hl(0, '@string.documentation', { fg = colors.pink }) - hl(0, '@string.regexp', { fg = colors.red }) - hl(0, '@string.escape', { fg = colors.pink }) - hl(0, '@string.special', { fg = colors.yellow }) - hl(0, '@string.special.symbol', { fg = colors.base0 }) + hl(0, '@string.documentation', { link = 'Statement' }) + hl(0, '@string.regexp', { link = 'Special' }) + hl(0, '@string.escape', { link = 'Statement' }) + hl(0, '@string.special', { link = 'Special' }) + hl(0, '@string.special.symbol', { link = 'Identifier' }) hl(0, '@string.special.url', { link = 'Underlined' }) - hl(0, '@character', { link = 'String' }) - hl(0, '@character.special', { fg = colors.yellow }) - hl(0, '@character.printf', { fg = colors.red }) + hl(0, '@character', { link = 'Constant' }) + hl(0, '@character.special', { link = 'Constant' }) + hl(0, '@character.printf', { link = 'Keyword' }) hl(0, '@type', { link = 'Type' }) - hl(0, '@type.builtin', { fg = colors.pink }) - hl(0, '@type.definition', { fg = colors.cyan }) - hl(0, '@type.qualifier', { fg = colors.pink }) + hl(0, '@type.builtin', { link = 'Keyword' }) + hl(0, '@type.definition', { link = 'Type' }) + hl(0, '@type.qualifier', { link = 'Type' }) + hl(0, '@attribute', { link = 'Keyword' }) hl(0, '@function', { link = 'Function' }) - hl(0, '@function.builtin', { fg = colors.cyan }) + hl(0, '@function.builtin', { link = 'Function' }) hl(0, '@function.call', { link = 'Function' }) hl(0, '@function.macro', { link = 'Function' }) hl(0, '@function.method', { link = 'Function' }) hl(0, '@function.method.call', { link = 'Function' }) hl(0, '@constructor', { link = 'Type' }) - hl(0, '@constructor.lua', { fg = colors.base0 }) - hl(0, '@operator', { fg = colors.pink }) - hl(0, '@keyword', { fg = colors.pink }) - hl(0, '@keyword.coroutine', { fg = colors.pink }) - hl(0, '@keyword.function', { fg = colors.pink }) - hl(0, '@keyword.operator', { fg = colors.pink }) - hl(0, '@keyword.import', { fg = colors.pink }) - hl(0, '@keyword.repeat', { fg = colors.pink }) - hl(0, '@keyword.return', { fg = colors.pink }) - hl(0, '@keyword.debug', { fg = colors.pink }) - hl(0, '@keyword.exception', { fg = colors.pink }) - hl(0, '@keyword.conditional', { fg = colors.pink }) - hl(0, '@keyword.conditional.ternary', { fg = colors.pink }) - hl(0, '@keyword.directive', { fg = colors.pink }) - hl(0, '@keyword.directive.define', { fg = colors.pink }) - hl(0, '@punctuation.delimiter', { fg = colors.base0 }) - hl(0, '@punctuation.bracket', { fg = colors.base0 }) - hl(0, '@punctuation.special', { fg = colors.pink }) + hl(0, '@constructor.lua', { link = 'Delimiter' }) + hl(0, '@operator', { link = 'Operator' }) + hl(0, '@keyword', { link = 'Keyword' }) + hl(0, '@keyword.coroutine', { link = 'Statement' }) + hl(0, '@keyword.function', { link = 'Keyword' }) + hl(0, '@keyword.type', { link = 'Keyword' }) + hl(0, '@keyword.operator', { link = 'Statement' }) + hl(0, '@keyword.import', { link = 'Include' }) + hl(0, '@keyword.repeat', { link = 'Statement' }) + hl(0, '@keyword.return', { link = 'Statement' }) + hl(0, '@keyword.debug', { link = 'Keyword' }) + hl(0, '@keyword.exception', { link = 'Statement' }) + hl(0, '@keyword.conditional', { link = 'Statement' }) + hl(0, '@keyword.conditional.ternary', { link = 'Statement' }) + hl(0, '@keyword.directive', { link = 'Statement' }) + hl(0, '@keyword.directive.define', { link = 'Statement' }) + hl(0, '@punctuation.delimiter', { link = 'Delimiter' }) + hl(0, '@punctuation.bracket', { link = 'Delimiter' }) + hl(0, '@punctuation.special', { link = 'Keyword' }) hl(0, '@comment', { link = 'Comment' }) hl(0, '@comment.documentation', { link = 'Comment' }) hl(0, '@comment.error', { fg = colors.diag_error, bg = colors.shade_error }) @@ -240,7 +250,12 @@ if config.plugins['nvim-treesitter'] then hl(0, '@markup.italic', { fg = colors.yellow, italic = true }) hl(0, '@markup.strikethrough', { fg = colors.base01 }) hl(0, '@markup.underline', { fg = colors.cyan, underline = true }) - hl(0, '@markup.heading', { fg = colors.purple, bold = true }) + hl(0, '@markup.heading.1', { fg = colors.purple, bold = true }) + hl(0, '@markup.heading.2', { fg = colors.red, bold = true }) + hl(0, '@markup.heading.3', { fg = colors.orange, bold = true }) + hl(0, '@markup.heading.4', { fg = colors.yellow, bold = true }) + hl(0, '@markup.heading.5', { fg = colors.cyan, bold = true }) + hl(0, '@markup.heading.6', { fg = colors.green, bold = true }) hl(0, '@markup.quote', { fg = colors.base01 }) hl(0, '@markup.math', { fg = colors.purple }) hl(0, '@markup.environment', { fg = colors.base01 }) @@ -255,13 +270,10 @@ if config.plugins['nvim-treesitter'] then hl(0, '@diff.plus', { fg = colors.git_added }) hl(0, '@diff.minus', { fg = colors.git_removed }) hl(0, '@diff.delta', { fg = colors.git_modified }) - hl(0, '@tag', { fg = colors.pink }) - hl(0, '@tag.attribute', { fg = colors.green }) - hl(0, '@tag.delimiter', { fg = colors.base0 }) - hl(0, '@property.yaml', { fg = colors.cyan }) - hl(0, '@property.json', { fg = colors.cyan }) - hl(0, '@property.css', { fg = colors.cyan }) - hl(0, '@property.scss', { fg = colors.cyan }) + hl(0, '@tag', { link = 'Tag' }) + hl(0, '@tag.builtin', { link = 'Tag' }) + hl(0, '@tag.attribute', { link = 'TagAttribute' }) + hl(0, '@tag.delimiter', { link = 'TagDelimiter' }) end if config.plugins['rainbow-delimiters'] then @@ -276,24 +288,30 @@ end if config.plugins['nvim-lspconfig'] then hl(0, '@lsp.type.class', { link = 'Type' }) - hl(0, '@lsp.type.decorator', { fg = colors.green }) + hl(0, '@lsp.type.comment', {}) + hl(0, '@lsp.type.decorator', { link = 'Function' }) hl(0, '@lsp.type.enum', { link = 'Type' }) hl(0, '@lsp.type.enumMember', { link = 'Constant' }) + hl(0, '@lsp.type.event', { link = 'Function' }) + hl(0, '@lsp.type.function', { link = 'Function' }) hl(0, '@lsp.type.interface', { link = 'Type' }) - hl(0, '@lsp.type.macro', { fg = colors.pink }) - hl(0, '@lsp.type.namespace', { fg = colors.base0 }) + hl(0, '@lsp.type.keyword', { link = 'Keyword' }) + hl(0, '@lsp.type.macro', { link = 'Constant' }) + hl(0, '@lsp.type.method', { link = 'Function' }) + -- hl(0,'@lsp.type.modifier') + hl(0, '@lsp.type.namespace', { link = 'Type' }) + hl(0, '@lsp.type.number', { link = 'Number' }) + hl(0, '@lsp.type.operator', { link = 'Operator' }) hl(0, '@lsp.type.parameter', { link = 'Parameter' }) - hl(0, '@lsp.type.property', { fg = colors.base0 }) + hl(0, '@lsp.type.property', { link = 'Property' }) + hl(0, '@lsp.type.regexp', { link = 'Special' }) + hl(0, '@lsp.type.string', { link = 'String' }) hl(0, '@lsp.type.struct', { link = 'Type' }) hl(0, '@lsp.type.type', { link = 'Type' }) hl(0, '@lsp.type.typeParameter', { link = 'Type' }) hl(0, '@lsp.type.variable', { link = 'Identifier' }) - hl(0, '@lsp.typemod.variable.defaultLibrary', { fg = colors.purple }) - hl(0, '@lsp.typemod.variable.readonly', { link = 'Constant' }) - hl(0, '@lsp.typemod.variable.global', { fg = colors.purple }) - hl(0, '@lsp.typemod.keyword.documentation', { fg = colors.pink }) - hl(0, '@lsp.typemod.class.documentation', { fg = colors.cyan }) - hl(0, '@lsp.typemod.property.readonly', { fg = colors.purple }) + hl(0, '@lsp.mod.readonly', { link = 'Constant' }) + hl(0, '@lsp.mod.global', { link = 'Constant' }) hl(0, 'DiagnosticError', { fg = colors.diag_error }) hl(0, 'DiagnosticWarn', { fg = colors.diag_warning }) hl(0, 'DiagnosticInfo', { fg = colors.diag_info }) diff --git a/colors/dracula.lua b/colors/dracula.lua index 17e93a4..31cb9fe 100644 --- a/colors/dracula.lua +++ b/colors/dracula.lua @@ -174,8 +174,8 @@ hl(0, 'Typedef', { link = 'Statement' }) hl(0, 'Special', { fg = colors.red }) hl(0, 'SpecialChar', { fg = colors.purple }) hl(0, 'Tag', { fg = colors.pink }) -hl(0, 'TagAttribute', { fg = colors.pink }) -hl(0, 'TagDelimiter', { fg = colors.green }) +hl(0, 'TagAttribute', { fg = colors.green }) +hl(0, 'TagDelimiter', { fg = colors.base0 }) hl(0, 'Delimiter', { fg = colors.base0 }) hl(0, 'SpecialComment', { fg = colors.pink }) hl(0, 'Debug', { fg = colors.pink }) @@ -271,6 +271,7 @@ if config.plugins['nvim-treesitter'] then hl(0, '@diff.minus', { fg = colors.git_removed }) hl(0, '@diff.delta', { fg = colors.git_modified }) hl(0, '@tag', { link = 'Tag' }) + hl(0, '@tag.builtin', { link = 'Tag' }) hl(0, '@tag.attribute', { link = 'TagAttribute' }) hl(0, '@tag.delimiter', { link = 'TagDelimiter' }) end