From b7d73e212c0d384808f78e2bd2477f854d338171 Mon Sep 17 00:00:00 2001 From: Max Miliano Date: Wed, 30 Oct 2024 11:15:52 -0300 Subject: [PATCH] fix: css highlights --- after/queries/css/highlights.scm | 8 ++++++++ colors/dracula-soft.lua | 9 +++++++-- colors/dracula.lua | 5 +++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 after/queries/css/highlights.scm diff --git a/after/queries/css/highlights.scm b/after/queries/css/highlights.scm new file mode 100644 index 0000000..c91371c --- /dev/null +++ b/after/queries/css/highlights.scm @@ -0,0 +1,8 @@ +; extends +((plain_value) @constant (#set! "priority" 125)) +(unit) @keyword +(keyframes_name) @variable.parameter +(rule_set + (selectors + (id_selector + (id_name) @function))) diff --git a/colors/dracula-soft.lua b/colors/dracula-soft.lua index 665e85b..a554a4f 100644 --- a/colors/dracula-soft.lua +++ b/colors/dracula-soft.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 }) @@ -192,6 +192,8 @@ if config.plugins['nvim-treesitter'] then hl(0, '@property', { link = 'Property' }) hl(0, '@property.json', { fg = colors.cyan }) hl(0, '@property.yaml', { fg = colors.cyan }) + hl(0, '@property.css', { fg = colors.cyan }) + hl(0, '@property.scss', { fg = colors.cyan }) hl(0, '@constant', { link = 'Constant' }) hl(0, '@constant.builtin', { link = 'Constant' }) hl(0, '@constant.macro', { link = 'Constant' }) @@ -208,8 +210,11 @@ if config.plugins['nvim-treesitter'] then hl(0, '@string.special.url', { link = 'Underlined' }) hl(0, '@character', { link = 'Constant' }) hl(0, '@character.special', { link = 'Constant' }) + hl(0, '@character.special.scss', { link = 'Keyword' }) hl(0, '@character.printf', { link = 'Keyword' }) hl(0, '@type', { link = 'Type' }) + hl(0, '@type.css', { fg = colors.green }) + hl(0, '@type.scss', { fg = colors.green }) hl(0, '@type.builtin', { link = 'Keyword' }) hl(0, '@type.definition', { link = 'Type' }) hl(0, '@type.qualifier', { link = 'Type' }) diff --git a/colors/dracula.lua b/colors/dracula.lua index 31cb9fe..2dca31e 100644 --- a/colors/dracula.lua +++ b/colors/dracula.lua @@ -192,6 +192,8 @@ if config.plugins['nvim-treesitter'] then hl(0, '@property', { link = 'Property' }) hl(0, '@property.json', { fg = colors.cyan }) hl(0, '@property.yaml', { fg = colors.cyan }) + hl(0, '@property.css', { fg = colors.cyan }) + hl(0, '@property.scss', { fg = colors.cyan }) hl(0, '@constant', { link = 'Constant' }) hl(0, '@constant.builtin', { link = 'Constant' }) hl(0, '@constant.macro', { link = 'Constant' }) @@ -208,8 +210,11 @@ if config.plugins['nvim-treesitter'] then hl(0, '@string.special.url', { link = 'Underlined' }) hl(0, '@character', { link = 'Constant' }) hl(0, '@character.special', { link = 'Constant' }) + hl(0, '@character.special.scss', { link = 'Keyword' }) hl(0, '@character.printf', { link = 'Keyword' }) hl(0, '@type', { link = 'Type' }) + hl(0, '@type.css', { fg = colors.green }) + hl(0, '@type.scss', { fg = colors.green }) hl(0, '@type.builtin', { link = 'Keyword' }) hl(0, '@type.definition', { link = 'Type' }) hl(0, '@type.qualifier', { link = 'Type' })