Use the same color scheme across wezterm/neovim.

main
Joshua Potter 2023-11-29 20:22:47 -07:00
parent f1678522c1
commit 0775ad0789
2 changed files with 33 additions and 29 deletions

View File

@ -2,6 +2,15 @@ args @ { config, pkgs, lib, ... }:
let let
utils = import ./utils.nix args; utils = import ./utils.nix args;
nightfox = {
plugin = utils.pluginGit
"eb82712f86319272f4b7b9dbb4ec6df650e6987f"
"EdenEast/nightfox.nvim";
config = ''
vim.cmd('colorscheme nordfox')
'';
};
nvim-cmp = { nvim-cmp = {
plugin = pkgs.vimPlugins.nvim-cmp; plugin = pkgs.vimPlugins.nvim-cmp;
config = '' config = ''
@ -84,6 +93,7 @@ in
inherit (p) plugin; inherit (p) plugin;
config = "lua << EOF\n${p.config}\nEOF"; config = "lua << EOF\n${p.config}\nEOF";
} else p) [ } else p) [
nightfox
nvim-cmp nvim-cmp
nvim-dap nvim-dap
nvim-lspconfig nvim-lspconfig
@ -98,33 +108,27 @@ in
vimAlias = true; vimAlias = true;
}; };
xdg.configFile."nvim/init.lua".text = lib.mkMerge [ xdg.configFile."nvim/init.lua".text =
# Extra Lua configuration to be prepended to `init.lua`. Extend the Lua let
# loader to search for our /nix/store/.../?.lua files. lua = import ./lua { inherit pkgs; };
(let in
lua = pkgs.stdenv.mkDerivation { lib.mkMerge [
name = "lua"; # Extra Lua configuration to be prepended to `init.lua`. Extend the
src = ./lua; # Lua loader to search for our /nix/store/.../?.lua files.
installPhase = '' (lib.mkBefore ''
mkdir -p $out/ package.path = '${lua}/?.lua;' .. package.path
cp -r ./* $out/ '')
''; # Extra Lua configuration to be appended to `init.lua`.
}; (lib.mkAfter ''
in lib.mkBefore '' vim.g.mapleader = ' '
package.path = '${lua}/?.lua;' .. package.path vim.g.maplocalleader = '\\'
'') vim.o.colorcolumn = '80,100'
vim.o.equalalways = false -- Disable auto window resize.
# Extra Lua configuration to be appended to `init.lua`. vim.o.expandtab = true -- Spaces instead of tabs.
(lib.mkAfter '' vim.o.list = true -- Show hidden characters.
vim.g.mapleader = ' ' vim.o.shiftwidth = 2 -- # of spaces to use for each (auto)indent.
vim.g.maplocalleader = '\\' vim.o.tabstop = 2 -- # of spaces a <Tab> in the file counts for.
vim.o.colorcolumn = '80,100' '')
vim.o.equalalways = false -- Disable auto window resize. ];
vim.o.expandtab = true -- Spaces instead of tabs.
vim.o.list = true -- Show hidden characters.
vim.o.shiftwidth = 2 -- # of spaces to use for each (auto)indent.
vim.o.tabstop = 2 -- # of spaces a <Tab> in the file counts for.
'')
];
}; };
} }

View File

@ -2,7 +2,7 @@ local wezterm = require('wezterm')
return { return {
check_for_updates = false, check_for_updates = false,
color_scheme = 'Chalk (Gogh)', color_scheme = 'nordfox',
font = wezterm.font 'Iosevka', font = wezterm.font 'Iosevka',
keys = { keys = {
{ {