Closed Lixeiden closed 10 months ago
@Lixeiden, you just need to install the colorscheme using this:
packer.nvim
use { 'lalitmee/cobalt2.nvim', requires = 'tjdevries/colorbuddy.nvim' }
lazy.nvim
{ 'lalitmee/cobalt2.nvim', dependencies = 'tjdevries/colorbuddy.nvim' }
and then just put this somewhere in your config and it should work:
require('colorbuddy').colorscheme('cobalt2')
You don't need to put anything else from anywhere.
With Lazy, you need to put:
return {
"lalitmee/cobalt2.nvim",
dependencies = {
lazy = false,
"tjdevries/colorbuddy.nvim",
},
-- {
-- "LazyVim/LazyVim",
-- opts = {
-- colorscheme = "cobalt2",
-- },
-- },
--}
.. and with LazyVim:
return {
"lalitmee/cobalt2.nvim",
dependencies = {
lazy = false,
"tjdevries/colorbuddy.nvim",
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "cobalt2",
},
},
}
This is because dependencies
are charged with lazy = true
by default, so colorbuddy
is not charged at startup, and cobalt2
doesen't load. I think this option should be on Readme explained for Lazy :)
@Atreyu-94 and @Lixeiden, I am also using lazy.nvim and I am installing cobalt2.nvim like the following:
return {
"lalitmee/cobalt2.nvim",
event = { "ColorSchemePre" }, -- if you want to lazy load
dependencies = { "tjdevries/colorbuddy.nvim" },
init = function()
require("colorbuddy").colorscheme("cobalt2")
end,
}
And it works without any issues.
Mine is with LazyVim, it works fine.
return {
{
"lalitmee/cobalt2.nvim",
dependencies = { "tjdevries/colorbuddy.nvim" },
config = function()
require("colorbuddy").colorscheme("cobalt2")
end,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "cobalt2",
},
},
}
Possible to install with VimPlug? for Neovim
Possible to install with VimPlug? for Neovim
It should be easy to install with Plug
. Just replace the keys with what Plug
has.
Plug "tjdevries/colorbuddy.nvim"
Plug "lalitmee/cobalt2.nvim"
after this
init.lua
require("colorbuddy").colorscheme("cobalt2")
init.vim
lua require("colorbuddy").colorscheme("cobalt2")
Try it.
Possible to install with VimPlug? for Neovim
It should be easy to install with
Plug
. Just replace the keys with whatPlug
has.Plug "tjdevries/colorbuddy.nvim" Plug "lalitmee/cobalt2.nvim"
after this
init.lua
require("colorbuddy").colorscheme("cobalt2")
init.vim
lua require("colorbuddy").colorscheme("cobalt2")
Try it.
Alright Thanks, I will try it
Everything is working Correctly, but why is there Black in the sides?
Everything is working Correctly, but why is there Black in the sides?
That is your terminal theme, you will need to set your terminal theme to cobalt2 if you don't want that black lines on the side
Hello there,
Just switched from neovim to lunarvim and am desperately trying to get cobalt2 to load. I've tried every single configuration from above and all I can get is a listing for cobalt2 in the choice for colours, but the colour itself does not load.
lunarvim uses packer as a plug-in loader.
Any ideas ?
⇒ KJ
@KenJean, please provide the configuration you are trying. And also provide the documentation for lunarvim colorschemes loading. I haven't used lunarvim
, so no idea.
Thanks for the quick response. Here's how one loads a plug-in in lunarvim. The config file is ~/.config/lvim/config.lua
:
lvim.plugins = {
{
'lalitmee/cobalt2.nvim',
dependencies = 'tjdevries/colorbuddy.nvim'
},
}
lvim.colorscheme = 'cobalt2'
The plugin manager is packer though, as you can see, they use a slightly different syntax. As I mentioned before, I have tried all the other variants from above inside the lvim.plugins = {}
block.
What I notice now is that the status bar does change to cobalt2, but not the text inside in the editor. This gives me a bad feeling for it looks like your cobalt2 theme does load but lunarvim doesn't know how to handle it.
I guess I'm out of luck if I want to stick with lunarvim.
⇒ KJ
@KenJean,
You are right, I think lunarvim
doesn't have the mechanism to apply the color schemes which are not used directly.
So it would be best if you did it manually.
You can still do this. As it's clearly mentioned in the README do it to use the color scheme.
require('colorbuddy').colorscheme('cobalt2')
If not, I suggest you try this after loading the color scheme and I am sure it will work.
Oh yeah !!!! That works a treat !
The trick, at least in my case in lunarvim, is to invoke that extra 'require' line only after loading the colorscheme - exactly as you suggested. I was doing it before, which didn't do the trick.
Many thanks for you help. I am eternally grateful.
⇒ KJ
@KenJean, I am glad it worked out.
Hello Friend! I'm novice with neovim. I have readed README.md but still have a trouble with installation.
Where is this code to apply?
I've putted this to my ~/.config/nvim/init.lua:
and have putted colors and lua dirs from your repo and lua dir from tjdevries/colorbuddy to ~/.config/nvim/
Maybe I miss something?