From d86039ea89ca89ac2cee8d645c93e0c841f59ad7 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 25 Sep 2016 18:06:32 +0200 Subject: [PATCH] Hook into Neovim's :CheckHealth with jedi#debug_info See https://github.com/neovim/neovim/blob/master/runtime/doc/pi_health.txt. --- autoload/health/jedi.vim | 4 ++++ autoload/jedi.vim | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 autoload/health/jedi.vim diff --git a/autoload/health/jedi.vim b/autoload/health/jedi.vim new file mode 100644 index 0000000..8c80e93 --- /dev/null +++ b/autoload/health/jedi.vim @@ -0,0 +1,4 @@ +function! health#jedi#check() abort + call health#report_start('jedi') + silent call jedi#debug_info() +endfunction diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 1f68da7..acfff0e 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -171,10 +171,10 @@ function! jedi#debug_info() PythonJedi print(' - site module: {0}'.format(__import__('site').__file__)) PythonJedi print('Jedi path: {0}'.format(jedi_vim.jedi.__file__)) PythonJedi print('Jedi version: {}'.format(jedi_vim.jedi.__version__)) - echo 'jedi-vim git status: ' - echon system('git -C '.s:script_path.' describe --tags --always --dirty') - echo 'jedi git status: ' - echon system('git -C '.s:script_path.' submodule status') + echo 'jedi-vim git version: ' + echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '') + echo 'jedi git submodule status: ' + echon substitute(system('git -C '.s:script_path.' submodule status'), '\v\n$', '', '') endfunction