Skip to content

Commit

Permalink
feat: use a more distinguishable color for todos (#645)
Browse files Browse the repository at this point in the history
* feat(treesitter): add highlight for todo comments

* feat: unify the color of todos

* feat: `@comment.note` -> `@comment.hint`

* fix: typos in legacy highlights

---------

Co-authored-by: mrtnvgr <[email protected]>
  • Loading branch information
ofseed and mrtnvgr authored Jan 22, 2024
1 parent 6853cc8 commit 657cc4f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lua/catppuccin/groups/integrations/NormalNvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local M = {}
function M.get()
return {
MarkdownTask = { fg = C.teal, style = { "bold" } },
MarkdownTodo = { fg = C.yellow, style = { "bold" } },
MarkdownTodo = { fg = C.flamingo, style = { "bold" } },
MarkdownNote = { fg = C.red, style = { "bold" } },
MarkdownSee = { fg = C.blue, style = { "bold" } },
MarkdownCheck = { fg = C.green, style = { "bold" } },
Expand Down
13 changes: 8 additions & 5 deletions lua/catppuccin/groups/integrations/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci

["@comment.error"] = { fg = C.base, bg = C.red },
["@comment.warning"] = { fg = C.base, bg = C.yellow },
["@comment.note"] = { fg = C.base, bg = C.blue },
["@comment.hint"] = { fg = C.base, bg = C.blue },
["@comment.todo"] = { fg = C.base, bg = C.flamingo },

-- Markup
["@markup"] = { fg = C.text }, -- For strings considerated text in a markup language.
Expand Down Expand Up @@ -212,11 +213,13 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
colors["@text.todo.checked"] = colors["@markup.list.checked"]
colors["@text.todo.unchecked"] = colors["@markup.list.unchecked"]

colors["@comment.note"] = colors["@comment.hint"]

-- @text.todo is now for todo comments, not todo notes like in markdown
colors["@text.todo"] = colors["comment.warning"]
colors["@text.warning"] = colors["comment.warning"]
colors["@text.note"] = colors["comment.note"]
colors["@text.danger"] = colors["comment.error"]
colors["@text.todo"] = colors["@comment.todo"]
colors["@text.warning"] = colors["@comment.warning"]
colors["@text.note"] = colors["@comment.note"]
colors["@text.danger"] = colors["@comment.error"]

-- @text.uri is now
-- @markup.link.url in markup links
Expand Down
2 changes: 1 addition & 1 deletion lua/catppuccin/groups/syntax.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function M.get()
-- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore|

Error = { fg = C.red }, -- (preferred) any erroneous construct
Todo = { bg = C.yellow, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
Todo = { bg = C.flamingo, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
qfLineNr = { fg = C.yellow },
qfFileName = { fg = C.blue },
htmlH1 = { fg = C.pink, style = { "bold" } },
Expand Down

0 comments on commit 657cc4f

Please sign in to comment.