Skip to content

Commit

Permalink
health.vim: check shada file neovim#10327
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk authored Jun 24, 2019
1 parent 8c7e41f commit 5ae57b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/autoload/health/nvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function! s:check_config() abort
if !filereadable(vimrc)
let ok = v:false
let has_vim = filereadable(expand('~/.vimrc'))
call health#report_warn('Missing user config file: '.vimrc,
call health#report_warn((-1 == getfsize(vimrc) ? 'Missing' : 'Unreadable').' user config file: '.vimrc,
\[ has_vim ? ':help nvim-from-vim' : ':help init.vim' ])
endif

Expand Down Expand Up @@ -41,6 +41,12 @@ function! s:check_config() abort
\ 'Check `:verbose set paste?` to see if a plugin or script set the option.', ])
endif

let shadafile = (empty(&shadafile) || &shadafile ==# 'NONE') ? stdpath('data').'/shada/main.shada' : &shadafile
if !empty(shadafile) && (!filereadable(shadafile) || !filewritable(shadafile))
let ok = v:false
call health#report_error('shada file is not '.(filereadable(shadafile) ? 'writeable' : 'readable').":\n".shadafile)
endif

if ok
call health#report_ok('no issues found')
endif
Expand Down

0 comments on commit 5ae57b7

Please sign in to comment.