nix/programs/vim.nix

60 lines
1.5 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
{
2024-07-04 01:14:24 +02:00
environment.systemPackages = [ pkgs.vim ];
home-manager.users.krizej = {
home.sessionVariables = { "EDITOR" = "vim"; };
# fixme: not .vim
home.file = { ".vim/colors/darcula.vim".source = ../files/darcula.vim; };
programs.vim = {
enable = true;
defaultEditor = true;
plugins = [
pkgs.vimPlugins.indentLine
pkgs.vimPlugins.vim-gitgutter
];
settings = let
vimCache = "~/.cache/vim";
in {
background = "dark";
2024-07-04 01:25:55 +02:00
backupdir = [ "${vimCache}/backup/" ];
2024-07-04 01:14:24 +02:00
copyindent = false;
2024-07-04 01:25:55 +02:00
directory = [ "~/.cache/vim/swap/" ];
2024-07-04 01:14:24 +02:00
expandtab = true;
hidden = false;
history = 420;
ignorecase = false;
modeline = true;
mouse = "a";
mousefocus = false;
mousehide = false;
mousemodel = "popup_setpos";
number = true;
relativenumber = true;
shiftwidth = 4;
smartcase = false;
tabstop = 4;
2024-07-04 01:25:55 +02:00
undodir = [ "~/.cache/vim/undo/" ];
2024-07-04 01:14:24 +02:00
undofile = false;
};
extraConfig = ''
set updatetime=100
set signcolumn=yes
set termguicolors
set cursorline
colorscheme darcula
let g:indentLine_char = ''
let g:c_no_ansi = 1
let g:c_functions = 1
let g:c_no_c99 = 1
let g:c_no_bsd = 1
let g:c_no_c11 = 1
let g:c_gnu = 1
'';
};
};
2024-07-04 01:14:24 +02:00
# fuck you
programs.nano.enable = false;
}