mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
move vim to new file
This commit is contained in:
parent
0c081ffc03
commit
fc6d55bb46
4 changed files with 37 additions and 38 deletions
|
@ -1,8 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
pl = lib.importJSON ./powerline-chars.json;
|
||||
|
||||
in
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./kubernetes.nix
|
||||
|
@ -147,29 +143,4 @@ in
|
|||
"nix-prefetch-github"
|
||||
"nix-shell"
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
packages.sconfig.start = with pkgs.vimPlugins; [
|
||||
vim-gitgutter
|
||||
vim-nix
|
||||
];
|
||||
customRC = ''
|
||||
set mouse=
|
||||
set encoding=utf-8
|
||||
scriptencoding utf-8
|
||||
set list nowrap scrolloff=9 updatetime=300 number
|
||||
highlight GitGutterAdd ctermfg=10
|
||||
highlight GitGutterChange ctermfg=11
|
||||
highlight GitGutterDelete ctermfg=9
|
||||
let g:gitgutter_sign_removed = '${pl.lower_left_triangle}'
|
||||
let g:gitgutter_sign_removed_first_line = '${pl.upper_left_triangle}'
|
||||
let g:gitgutter_sign_modified_removed = '~~'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"left_hard_divider": "\uE0B0",
|
||||
"lower_left_triangle": "\uE0B8",
|
||||
"upper_left_triangle": "\uE0BC"
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
pl = lib.importJSON ./powerline-chars.json;
|
||||
left_hard_divider = builtins.fromJSON '' "\uE0B0" '';
|
||||
upper_left_triangle = builtins.fromJSON '' "\uE0BC" '';
|
||||
|
||||
theme = {
|
||||
BoldForeground = true;
|
||||
|
@ -14,11 +15,11 @@ let
|
|||
Content = "$";
|
||||
Foreground = 231;
|
||||
Background = 102;
|
||||
Separator = pl.left_hard_divider;
|
||||
Separator = left_hard_divider;
|
||||
}];
|
||||
|
||||
plconfig = builtins.toFile "powerline-config.json" (builtins.toJSON {
|
||||
modes.patched.Separator = pl.upper_left_triangle;
|
||||
modes.patched.Separator = upper_left_triangle;
|
||||
});
|
||||
|
||||
args = [
|
||||
|
|
32
modules/vim.nix
Normal file
32
modules/vim.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
lower_left_triangle = builtins.fromJSON '' "\uE0B8" '';
|
||||
upper_left_triangle = builtins.fromJSON '' "\uE0BC" '';
|
||||
|
||||
in
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
configure = {
|
||||
packages.sconfig.start = with pkgs.vimPlugins; [
|
||||
vim-gitgutter
|
||||
vim-nix
|
||||
];
|
||||
customRC = ''
|
||||
set mouse=
|
||||
set encoding=utf-8
|
||||
scriptencoding utf-8
|
||||
set list nowrap scrolloff=9 updatetime=300 number
|
||||
highlight GitGutterAdd ctermfg=10
|
||||
highlight GitGutterChange ctermfg=11
|
||||
highlight GitGutterDelete ctermfg=9
|
||||
let g:gitgutter_sign_removed = '${lower_left_triangle}'
|
||||
let g:gitgutter_sign_removed_first_line = '${upper_left_triangle}'
|
||||
let g:gitgutter_sign_modified_removed = '~~'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue