From 22ba2bb523cce822d72a77a5cd80656da9d62293 Mon Sep 17 00:00:00 2001 From: aileot <46470475+aileot@users.noreply.github.com> Date: Mon, 3 Feb 2025 06:09:20 +0900 Subject: [PATCH 1/6] refactor(gitsigns): avoid redundant links (#336) The `SignAdd`, `SignChange`, and `SignDelete` are never referenced by any other highlight definitions than the previous `GitSigns` ones before this change. The isolated definitions are only left for backward compatibility. --- lua/rose-pine.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 5f4bf54..81bfd4f 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -451,9 +451,9 @@ local function set_highlights() BufferVisibleTarget = { fg = palette.gold }, -- lewis6991/gitsigns.nvim - GitSignsAdd = { link = "SignAdd" }, - GitSignsChange = { link = "SignChange" }, - GitSignsDelete = { link = "SignDelete" }, + GitSignsAdd = { fg = groups.git_add, bg = "NONE" }, + GitSignsChange = { fg = groups.git_change, bg = "NONE" }, + GitSignsDelete = { fg = groups.git_delete, bg = "NONE" }, SignAdd = { fg = groups.git_add, bg = "NONE" }, SignChange = { fg = groups.git_change, bg = "NONE" }, SignDelete = { fg = groups.git_delete, bg = "NONE" }, From 5aa039f2d9f6dc4a1ad3a9fc819e82825b240d24 Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 3 Feb 2025 11:05:20 -0600 Subject: [PATCH 2/6] refactor: update documentation --- lua/rose-pine.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 81bfd4f..660759a 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -271,7 +271,8 @@ local function set_highlights() mkdRule = { fg = palette.subtle }, mkdURL = { link = "markdownUrl" }, - --- Identifiers + --- Treesitter + --- |:help treesitter-highlight-groups| ["@variable"] = { fg = palette.text, italic = styles.italic }, ["@variable.builtin"] = { fg = palette.love, bold = styles.bold }, ["@variable.parameter"] = { fg = palette.iris, italic = styles.italic }, @@ -285,7 +286,6 @@ local function set_highlights() ["@module.builtin"] = { fg = palette.text, bold = styles.bold }, ["@label"] = { link = "Label" }, - --- Literals ["@string"] = { link = "String" }, -- ["@string.documentation"] = {}, ["@string.regexp"] = { fg = palette.iris }, @@ -303,27 +303,24 @@ local function set_highlights() ["@number.float"] = { link = "Number" }, ["@float"] = { link = "Number" }, - --- Types ["@type"] = { fg = palette.foam }, ["@type.builtin"] = { fg = palette.foam, bold = styles.bold }, -- ["@type.definition"] = {}, - -- ["@type.qualifier"] = {}, -- ["@attribute"] = {}, ["@property"] = { fg = palette.foam, italic = styles.italic }, - --- Functions ["@function"] = { fg = palette.rose }, ["@function.builtin"] = { fg = palette.rose, bold = styles.bold }, -- ["@function.call"] = {}, ["@function.macro"] = { link = "Function" }, + ["@function.method"] = { fg = palette.rose }, ["@function.method.call"] = { fg = palette.iris }, ["@constructor"] = { fg = palette.foam }, ["@operator"] = { link = "Operator" }, - --- Keywords ["@keyword"] = { link = "Keyword" }, -- ["@keyword.coroutine"] = {}, -- ["@keyword.function"] = {}, @@ -334,8 +331,10 @@ local function set_highlights() ["@keyword.return"] = { fg = palette.pine }, ["@keyword.debug"] = { fg = palette.rose }, ["@keyword.exception"] = { fg = palette.pine }, + ["@keyword.conditional"] = { fg = palette.pine }, ["@keyword.conditional.ternary"] = { fg = palette.pine }, + ["@keyword.directive"] = { fg = palette.iris }, ["@keyword.directive.define"] = { fg = palette.iris }, From 179aadcc1e8d688b14705e9693cc2aee72358581 Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 3 Feb 2025 11:05:44 -0600 Subject: [PATCH 3/6] feat: use consistent variable styles --- lua/rose-pine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 660759a..054be1c 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -274,8 +274,9 @@ local function set_highlights() --- Treesitter --- |:help treesitter-highlight-groups| ["@variable"] = { fg = palette.text, italic = styles.italic }, - ["@variable.builtin"] = { fg = palette.love, bold = styles.bold }, + ["@variable.builtin"] = { fg = palette.love, italic = styles.italic, bold = styles.bold }, ["@variable.parameter"] = { fg = palette.iris, italic = styles.italic }, + ["@variable.parameter.builtin"] = { fg = palette.iris, italic = styles.italic, bold = styles.bold }, ["@variable.member"] = { fg = palette.foam }, ["@constant"] = { fg = palette.gold }, From 8abda07d73ee66d3a0add5f603a2a97b7dfec17c Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 3 Feb 2025 11:05:57 -0600 Subject: [PATCH 4/6] feat: set attribute style --- lua/rose-pine.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 054be1c..4d55469 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -308,7 +308,8 @@ local function set_highlights() ["@type.builtin"] = { fg = palette.foam, bold = styles.bold }, -- ["@type.definition"] = {}, - -- ["@attribute"] = {}, + ["@attribute"] = { fg = "iris" }, + ["@attribute.builtin"] = { fg = "iris", bold = styles.bold }, ["@property"] = { fg = palette.foam, italic = styles.italic }, ["@function"] = { fg = palette.rose }, From d5f7c2ee7b5c00082224e40903c850aa1b55f3ef Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 3 Feb 2025 11:06:21 -0600 Subject: [PATCH 5/6] feat: reduce background opacity for special comments --- lua/rose-pine.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 4d55469..523e9d6 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -351,10 +351,10 @@ local function set_highlights() ["@comment.error"] = { fg = groups.error }, ["@comment.warning"] = { fg = groups.warn }, - ["@comment.todo"] = { fg = groups.todo, bg = groups.todo, blend = 20 }, - ["@comment.hint"] = { fg = groups.hint, bg = groups.hint, blend = 20 }, - ["@comment.info"] = { fg = groups.info, bg = groups.info, blend = 20 }, - ["@comment.note"] = { fg = groups.note, bg = groups.note, blend = 20 }, + ["@comment.todo"] = { fg = groups.todo, bg = groups.todo, blend = 15 }, + ["@comment.hint"] = { fg = groups.hint, bg = groups.hint, blend = 15 }, + ["@comment.info"] = { fg = groups.info, bg = groups.info, blend = 15 }, + ["@comment.note"] = { fg = groups.note, bg = groups.note, blend = 15 }, --- Markup ["@markup.strong"] = { bold = styles.bold }, From 00ec4cec924b624920baac9d42eac02e1efcae76 Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 3 Feb 2025 11:28:57 -0600 Subject: [PATCH 6/6] fix: invalid palette format --- lua/rose-pine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 523e9d6..4f4dfdc 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -308,8 +308,8 @@ local function set_highlights() ["@type.builtin"] = { fg = palette.foam, bold = styles.bold }, -- ["@type.definition"] = {}, - ["@attribute"] = { fg = "iris" }, - ["@attribute.builtin"] = { fg = "iris", bold = styles.bold }, + ["@attribute"] = { fg = palette.iris }, + ["@attribute.builtin"] = { fg = palette.iris, bold = styles.bold }, ["@property"] = { fg = palette.foam, italic = styles.italic }, ["@function"] = { fg = palette.rose },