Open vendion opened 1 month ago
As a temporary fix, you can use the following option
programs.nixvim = {
extraConfigLuaPost = ''vim.cmd [[ colorscheme nord ]]'';
};
if you want
This should already be done by mkVimPlugin
:
Perhaps the generated lua code is ending up in the wrong part of init.lua
and is not having the desired effect :thinking:
mkVimPlugin
sets our colorscheme
option: https://github.com/nix-community/nixvim/blob/929bb0cd1cffb9917ab14be9cdb3f27efd6f505f/lib/vim-plugin.nix#L115-L117
Our colorscheme
option adds the code to extraConfigVim
: https://github.com/nix-community/nixvim/blob/929bb0cd1cffb9917ab14be9cdb3f27efd6f505f/modules/colorscheme.nix#L12-L14
Our content
option sandwiches extraConfigVim
between extraConfigLuaPre
and extraConfigLua
: https://github.com/nix-community/nixvim/blob/929bb0cd1cffb9917ab14be9cdb3f27efd6f505f/modules/output.nix#L113-L121
You can inspect the final generated lua yourself using nixvim-print-init
.
Checking the output of nixvim-print-init
I see that the first place colorscheme
appears is like so
143 vim.cmd([[let $BAT_THEME = 'nord'
144
145 colorscheme nord
146 ]])
Which from the line numbers (143-146) happens early on, so is probably the one that is added automatically and thus the one not working. Then the very last line is just vim.cmd([[ colorscheme nord ]])
which I assume is the one I manually added with extraConfigLuaPost
.
This might actually be a regression in colorscheme
. I just updated my system for the first time a while and I noticed my colors were off. I have been using:
programs.nixvim = {
enable = true;
colorscheme = "solarized-flat";
extraPlugins = [ pkgs.vimPlugins.nvim-solarized-lua ];
# Rest of config
};
I can check my flake.lock for a potential bisect if it helps.
nord
unstable
unstable
Description
Setting the default colorscheme to
nord
viacolorschemes.nord.enable
doesn't work, while the colorscheme gets installed and can be switched to by doing:colorscheme nord
, the default Neovim colorscheme is used by default.I have also tested with
colorschemes.cyberdream.enable
and got the same result.Minimal, Reproducible Example (MRE)