From a8b4d76a0a2c59a3a368932ae111265c15b8dccb Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 27 Aug 2018 01:31:57 +0200 Subject: health.vim: Detect missing init.vim closes #4877 --- runtime/autoload/health/nvim.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim index d09a714719..93660d05dc 100644 --- a/runtime/autoload/health/nvim.vim +++ b/runtime/autoload/health/nvim.vim @@ -4,6 +4,14 @@ function! s:check_config() abort let ok = v:true call health#report_start('Configuration') + let vimrc = empty($MYVIMRC) ? stdpath('config').'/init.vim' : $MYVIMRC + if !filereadable(vimrc) + let ok = v:false + let has_vim = filereadable(expand('~/.vimrc')) + call health#report_warn('Missing user config file: '.vimrc, + \[ has_vim ? ':help nvim-from-vim' : ':help init.vim' ]) + endif + " If $VIM is empty we don't care. Else make sure it is valid. if !empty($VIM) && !filereadable($VIM.'/runtime/doc/nvim.txt') let ok = v:false -- cgit