neovim colors.lua based on colorscheme

This commit is contained in:
Noah Masur 2022-07-09 21:57:56 +00:00
parent a10e33c1e1
commit cc801b4981
4 changed files with 28 additions and 18 deletions

View File

@ -12,6 +12,7 @@ nixpkgs.lib.nixosSystem {
{
networking.hostName = "wsl";
gui.enable = false;
gui.colorscheme = (import ../../modules/colorscheme/gruvbox);
passwordHash =
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
wsl = {

View File

@ -18,4 +18,26 @@
base0D = "#83a598"; # blue
base0E = "#d3869b"; # purple
base0F = "#d65d0e"; # brown
neovimConfig = ''
local M = {}
M.packer = function(use)
use({
"morhetz/gruvbox",
config = function()
vim.g.gruvbox_italic = 1
-- vim.api.nvim_create_autocmd("ColorScheme", {
-- pattern = "*",
-- command = "colorscheme gruvbox",
-- })
vim.cmd([[
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
colorscheme gruvbox
]])
end,
})
end
return M
'';
}

View File

@ -11,7 +11,11 @@
xdg.configFile = {
"nvim/init.lua".source = ./init.lua;
"nvim/lua".source = ./lua;
"nvim/lua" = {
source = ./lua;
recursive = true; # Allows adding more files
};
"nvim/lua/packer/colors.lua".text = config.gui.colorscheme.neovimConfig;
};
programs.git.extraConfig.core.editor = "nvim";

View File

@ -1,17 +0,0 @@
local M = {}
M.packer = function(use)
-- Colorscheme
use({
"morhetz/gruvbox",
config = function()
vim.g.gruvbox_italic = 1
vim.cmd([[
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
colorscheme gruvbox
]])
end,
})
end
return M