tokyonight.nvim icon indicating copy to clipboard operation
tokyonight.nvim copied to clipboard

bug: TODO/NOTE/etc Comments not changing color when specified on highlight

Open RyanSaxe opened this issue 7 months ago • 0 comments

Did you check docs and existing issues?

  • [x] I have read all the tokyonight.nvim docs
  • [x] I have updated the plugin to the latest version before submitting this issue
  • [x] I have searched the existing issues of tokyonight.nvim
  • [x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.11.0

Operating system/version

MacOS 14.7.4

Describe the bug

I went to this issue in order to change the color of docstrings in python: #696

I wanted to make my docstrings dim, but slightly different. And have my notes/todos have the same overall color, but brighter. So I wrote the following config

local Util = require("tokyonight.util")
return {
  "folke/tokyonight.nvim",
  lazy = false,
  priority = 1000,
  opts = {
    style = "night",
    on_highlights = function(hl, c)
      hl["@string.documentation"] = { fg = Util.blend_bg(c.green1, 0.5) }
      hl["@comment.todo"] = { fg = Util.blend_bg(c.green1, 0.9) }
      hl["@comment.note"] = { fg = Util.blend_bg(c.green1, 0.7) }
    end,
  },
}

This works for changing the color of the docstrings, however the TODO and NOTE comments did not change color at all.

similarly, if I try and change the colors object directly, it does not do anything when overwriting colors.todo via the on_colors function.

Steps To Reproduce

  1. Install the LazyVim via Kickstart
  2. add the lua plugin shared
  3. check and see that the TODO comments and such have not changed

Expected Behavior

The TODO and NOTE comments should no longer be the default color for the tokyonight theme

Repro

lazyvim starter config

RyanSaxe avatar May 20 '25 16:05 RyanSaxe