mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Initial commit
This commit is contained in:
commit
2c9631997f
9 changed files with 490 additions and 0 deletions
18
plugins/colorschemes/gruvbox.nix
Normal file
18
plugins/colorschemes/gruvbox.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.colorschemes.gruvbox;
|
||||
in {
|
||||
options = {
|
||||
programs.nixvim.colorschemes.gruvbox = {
|
||||
enable = mkEnableOption "Enable gruvbox";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
colorscheme = "gruvbox";
|
||||
extraPlugins = [ pkgs.vimPlugins.gruvbox ];
|
||||
};
|
||||
};
|
||||
}
|
6
plugins/default.nix
Normal file
6
plugins/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./statuslines/lightline.nix
|
||||
./colorschemes/gruvbox.nix
|
||||
];
|
||||
}
|
29
plugins/statuslines/lightline.nix
Normal file
29
plugins/statuslines/lightline.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.plugins.lightline;
|
||||
in {
|
||||
options = {
|
||||
programs.nixvim.plugins.lightline = {
|
||||
enable = mkEnableOption "Enable lightline";
|
||||
|
||||
colorscheme = mkOption {
|
||||
type = types.str;
|
||||
default = config.programs.nixvim.colorscheme;
|
||||
description = "The colorscheme to use for lightline. Defaults to .colorscheme.";
|
||||
example = "gruvbox";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.lightline-vim ];
|
||||
extraConfigVim = ''
|
||||
""" lightline {{{
|
||||
let g:lightline = { 'colorscheme': '${cfg.colorscheme}' }
|
||||
""" }}}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue