1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

neovim: use bas16 manually

This commit is contained in:
2024-12-13 13:42:39 +01:00
parent 2c6007d404
commit f8c3a9dbef
4 changed files with 22 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
{
pkgs,
niveumPackages,
config,
...
}: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
@@ -35,7 +36,10 @@
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
niveumPackages.vim
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
colorscheme = if config.networking.hostName == "fatteh" then "base16-grayscale-light" else "base16-grayscale-dark";
})
# language servers
pkgs.pyright

View File

@@ -3,8 +3,6 @@ vnoremap a= :Tabularize /=<CR>
vnoremap a; :Tabularize /::<CR>
vnoremap a- :Tabularize /-><CR>
colorscheme dim
" noremap <Leader>h :<C-u>split<CR>
" noremap <Leader>v :<C-u>vsplit<CR>
noremap <Leader>gs :Git<CR>

View File

@@ -4,6 +4,10 @@
fetchFromGitHub,
vimUtils,
niveumPackages,
writeText,
stylixColors ? null,
colorscheme ? null,
lib,
...
}: (neovim.override {
configure = {
@@ -12,9 +16,21 @@
source ${../lib/vim/init.vim}
let g:snippet_directory = '${vimPlugins.friendly-snippets}'
luafile ${../lib/vim/init.lua}
'' + lib.optionalString (stylixColors != null) (with stylixColors.withHashtag; ''
luafile ${writeText "colors.lua" ''
require('base16-colorscheme').setup({
base00 = '${base00}', base01 = '${base01}', base02 = '${base02}', base03 = '${base03}',
base04 = '${base04}', base05 = '${base05}', base06 = '${base06}', base07 = '${base07}',
base08 = '${base08}', base09 = '${base09}', base0A = '${base0A}', base0B = '${base0B}',
base0C = '${base0C}', base0D = '${base0D}', base0E = '${base0E}', base0F = '${base0F}'
})
''}
'') + lib.optionalString (colorscheme != null) ''
colorscheme ${colorscheme}
'';
packages.nvim = with vimPlugins; {
start = [
base16-nvim
nvim-cmp
cmp-buffer
cmp-path

View File

@@ -20,7 +20,7 @@ in {
services.illum.enable = true;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/selenized-light.yaml";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/grayscale-light.yaml";
age.secrets = {
retiolum-rsa = {