nixos-configs/common/home/neovim/theme.nix
matt1432 ac2b846662
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(nvim): split up lang configs in separate files
2024-05-07 22:49:00 -04:00

80 lines
1.9 KiB
Nix

{
config,
pkgs,
lib,
nvim-theme-src,
...
}: let
inherit (config.vars) neovimIde;
inherit (lib) fileContents optionals;
inherit (pkgs) vimPlugins;
in {
programs = {
neovim = {
extraPackages = with pkgs; [
bat
];
plugins =
[
{
plugin = vimPlugins.dracula-nvim.overrideAttrs {
src = nvim-theme-src;
};
type = "lua";
config =
/*
lua
*/
''
-- set dot icon in place of trailing whitespaces
vim.cmd[[set list listchars=tab:\ \ ,nbsp:,trail:,extends:,precedes:]]
-- Add visual indicator for trailing whitespaces
vim.opt.fillchars = {eob = " "}
vim.cmd[[colorscheme dracula]]
'';
}
{
plugin = vimPlugins.indent-blankline-nvim;
type = "lua";
config = fileContents ./plugins/indent.lua;
}
]
++ optionals neovimIde [
{
plugin = vimPlugins.lualine-nvim;
type = "lua";
config =
/*
lua
*/
''
require('lualine').setup({
options = {
theme = 'dracula',
globalstatus = true,
},
sections = {
lualine_x = { 'g:coc_status', 'bo:filetype' },
},
});
'';
}
{
plugin = vimPlugins.neo-tree-nvim;
type = "viml";
config = ''
${fileContents ./plugins/neotree.vim}
lua << EOF
${fileContents ./plugins/neotree.lua}
EOF
'';
}
];
};
};
}