1
0
forked from extern/nix-config

neovim: Replace vim-startify with alpha-nvim

alpha-nvim is significantly faster than vim-startify and doesn't error
on first startup.
This commit is contained in:
Donovan Glover 2023-06-12 21:48:43 -04:00
parent 9b55087bf4
commit a16236534f
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -274,30 +274,37 @@ in
'';
}
{
plugin = vim-startify;
config = /* vim */ ''
let g:startify_custom_header = startify#pad(split(system("${pkgs.fish}/bin/fish -c 'cat (random choice (${pkgs.fd}/bin/fd . ${pkgs.ponysay}/share/ponysay/quotes --ignore-file ~/.config/fd/ponyignore))'"), '\n'))
let g:startify_change_to_dir = 0
function! s:gitModified()
let files = systemlist('git ls-files -m 2>/dev/null')
return map(files, "{'line': v:val, 'path': v:val}")
endfunction
function! s:gitUntracked()
let files = systemlist('git ls-files -o --exclude-standard 2>/dev/null')
return map(files, "{'line': v:val, 'path': v:val}")
endfunction
let g:startify_lists = [
\ { 'type': 'dir', 'header': [' '. getcwd()] },
\ { 'type': function('s:gitModified'), 'header': [' ']},
\ { 'type': function('s:gitUntracked'), 'header': [' ']},
\ { 'type': 'commands', 'header': [' Commands']},
\ ]
plugin = alpha-nvim;
type = "lua";
config = ''
require'alpha'.setup(require'alpha.themes.startify'.config)
'';
}
# {
# plugin = vim-startify;
# config = /* vim */ ''
# let g:startify_custom_header = startify#pad(split(system("${pkgs.fish}/bin/fish -c 'cat (random choice (${pkgs.fd}/bin/fd . ${pkgs.ponysay}/share/ponysay/quotes --ignore-file ~/.config/fd/ponyignore))'"), '\n'))
#
# let g:startify_change_to_dir = 0
#
# function! s:gitModified()
# let files = systemlist('git ls-files -m 2>/dev/null')
# return map(files, "{'line': v:val, 'path': v:val}")
# endfunction
#
# function! s:gitUntracked()
# let files = systemlist('git ls-files -o --exclude-standard 2>/dev/null')
# return map(files, "{'line': v:val, 'path': v:val}")
# endfunction
#
# let g:startify_lists = [
# \ { 'type': 'dir', 'header': [' 歴史 '. getcwd()] },
# \ { 'type': function('s:gitModified'), 'header': [' 変化']},
# \ { 'type': function('s:gitUntracked'), 'header': [' 新規']},
# \ { 'type': 'commands', 'header': [' Commands']},
# \ ]
# '';
# }
fzf-vim
vim-caddyfile
vim-graphql