First, let’s install dark-notify
on your Mac:
brew install cormacrelf/tap/dark-notify
In your plugins/user.lua
, add the following lines:
{
"cormacrelf/dark-notify",
event = "ColorScheme",
config = function()
require("dark_notify").run {
schemes = {
light = "rose-pine-dawn", -- your light theme
dark = "rose-pine-main", -- your dark thene
},
}
end,
},
Restart nvim
and open the “Appearance” setting menu of your Mac:
Sometimes during the day, you want to force the lightness mode because you change your spot. Then you can add the following lines to your mappings.lua
:
["<leader>t"] = {
function()
local dn = require('dark_notify')
dn.toggle()
end,
}
Now you can press leader + t
and toggle the mode manually.
🎉 Your IDE is now ready for dark/light mode!