Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module catppuccin not found #59

Closed
Suyashtnt opened this issue Jun 10, 2022 · 5 comments
Closed

module catppuccin not found #59

Suyashtnt opened this issue Jun 10, 2022 · 5 comments

Comments

@Suyashtnt
Copy link

When I try to switch the colour scheme to catppuccin, it just gives me a massive error
image

@abzcoding
Copy link
Owner

abzcoding commented Jun 10, 2022

yes, changing the theme is not that easy 😅 (sorry for that)
since I have time-based themes

Screen Shot 2022-06-11 at 12 54 16 AM

i would suggest forking my repo and not using it directly
then you can change these lines

{
"rose-pine/neovim",
as = "rose-pine",
config = function()
require("user.theme").rose_pine()
vim.cmd [[colorscheme rose-pine]]
end,
cond = function()
local _time = os.date "*t"
return (_time.hour >= 1 and _time.hour < 9)
end,
},
{
"abzcoding/tokyonight.nvim",
branch = "feat/local",
config = function()
require("user.theme").tokyonight()
vim.cmd [[colorscheme tokyonight]]
end,
cond = function()
local _time = os.date "*t"
return _time.hour >= 9 and _time.hour < 17
end,
},
{
"catppuccin/nvim",
as = "catppuccin",
config = function()
require("user.theme").catppuccin()
vim.cmd [[colorscheme catppuccin]]
end,
cond = function()
local _time = os.date "*t"
return (_time.hour >= 17 and _time.hour < 21)
end,
},
{
"rebelot/kanagawa.nvim",
config = function()
require("user.theme").kanagawa()
vim.cmd [[colorscheme kanagawa]]
end,
cond = function()
local _time = os.date "*t"
return (_time.hour >= 21 and _time.hour < 24) or (_time.hour >= 0 and _time.hour < 1)
end,
},

and also these

lvim/lua/user/theme.lua

Lines 243 to 256 in 4e862d6

M.current_colors = function()
local colors = M.colors.tokyonight_colors
local _time = os.date "*t"
if _time.hour >= 1 and _time.hour < 9 then
colors = M.colors.rose_pine_colors
elseif _time.hour >= 9 and _time.hour < 17 then
colors = M.colors.tokyonight_colors
elseif _time.hour >= 17 and _time.hour < 21 then
colors = M.colors.catppuccin_colors
elseif (_time.hour >= 21 and _time.hour < 24) or (_time.hour >= 0 and _time.hour < 1) then
colors = M.colors.kanagawa_colors
end
return colors
end

@Suyashtnt
Copy link
Author

Suyashtnt commented Jun 10, 2022

If you check my GH i do have a personal fork, thanks for the info!

@abzcoding abzcoding reopened this Jun 10, 2022
@abzcoding
Copy link
Owner

If you check my GH i do have a personal fork, thanks for the info!

good so to be clear
you cannot just do :colorscheme catppuccin with your current codebase ( you'll get that error thingy

you have to either

  • change the time tables
  • or remove them entirely and use a single theme

@luxus
Copy link
Contributor

luxus commented Jun 15, 2022

@Suyashtnt good news, abz added a easier way to change the theme

@Suyashtnt
Copy link
Author

@Suyashtnt good news, abz added a easier way to change the theme

I no longer use abzcoding, but if I go back to it then thanks for letting me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants