From a16236534f7f8a0a8119f4694fb1ee4736fdd3d9 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Mon, 12 Jun 2023 21:48:43 -0400 Subject: [PATCH] neovim: Replace vim-startify with alpha-nvim alpha-nvim is significantly faster than vim-startify and doesn't error on first startup. --- modules/neovim/default.nix | 51 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index dbe3bf4..a73701e 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -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