neovim: add peristant undo file
This commit is contained in:
parent
db68083382
commit
8cf555833b
|
@ -1,5 +1,7 @@
|
||||||
{ pkgs, lib, inputs, config, ...}:
|
{ pkgs, lib, inputs, config, ...}:
|
||||||
{
|
let
|
||||||
|
undoDir = "${config.home.homeDirectory}/.vim/undo";
|
||||||
|
in {
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
@ -41,6 +43,11 @@
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
|
set undofile
|
||||||
|
set undodir=${undoDir}
|
||||||
|
set undolevels=1000
|
||||||
|
set undoreload=10000
|
||||||
|
|
||||||
" Integrate status with lightline
|
" Integrate status with lightline
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
|
@ -117,4 +124,7 @@
|
||||||
map <Leader><Space> :noh<CR>
|
map <Leader><Space> :noh<CR>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create undo directory
|
||||||
|
home.activation.vimUndoDir = lib.hm.dag.entryAfter ["writeBoundary"] "mkdir -p ${undoDir}";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue