diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 40ef36a3c..5a83a8186 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,19 +1,15 @@ -### Expected behavior, english is recommend +## Expected behavior, english is recommend -### Environment Information +## Environment Information - OS: - vim version: - neovim version: -### The reproduce ways from Vim starting (Required!) +## The reproduce ways from Vim starting (Required!) -### Output of the ":message" command, and ":echo SpaceVim#logger#viewLog()" +## Output of the ":message" command, and ":echo SpaceVim#logger#viewLog()" -```log -please post log here: +please post log below, if you want me reproduce your issue quickly, post your custom config here will be better. - - -``` diff --git a/autoload/SpaceVim/health/python.vim b/autoload/SpaceVim/health/python.vim index e69de29bb..f1cb7ddbc 100644 --- a/autoload/SpaceVim/health/python.vim +++ b/autoload/SpaceVim/health/python.vim @@ -0,0 +1,41 @@ +function! SpaceVim#health#python#check() abort + let result = ['SpaceVim python support check report:'] + if has('nvim') + call add(result, 'Checking +python3:') + if has('python3') + call add(result, ' SUCCEED!') + else + call add(result, ' Failed : to support +python3, you need run `pip3 install neovim`') + endif + call add(result, 'Checking +python:') + if has('python') + call add(result, ' SUCCEED!') + else + call add(result, ' Failed : to support +python, you need run `pip2 install neovim`') + endif + else + call add(result, 'Checking +python3:') + if has('python3') + call add(result, ' SUCCEED!') + else + if !WINDOWS() + call add(result, ' Failed : to support +python3, Please install vim-gik, or build from sources.') + else + call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') + call add(result, ' install python3, make sure you have `python` in your path.') + endif + endif + call add(result, 'Checking +python:') + if has('python') + call add(result, ' SUCCEED!') + else + if !WINDOWS() + call add(result, ' Failed : to support +python, Please install vim-gik, or build from sources.') + else + call add(result, ' Failed : to support +python3, install vim from https://github.com/vim/vim-win32-installer/releases') + call add(result, ' install python3, make sure you have `python` in your path.') + endif + endif + endif + return result +endfunction diff --git a/autoload/SpaceVim/logger.vim b/autoload/SpaceVim/logger.vim index 08cc06067..c6b7369c2 100644 --- a/autoload/SpaceVim/logger.vim +++ b/autoload/SpaceVim/logger.vim @@ -47,19 +47,29 @@ endfunction function! SpaceVim#logger#viewLog(...) abort - let info = "SpaceVim Options :\n\n" + let info = "### SpaceVim Options :\n\n" + let info .= "```viml\n" let info .= join(SpaceVim#options#list(), "\n") - let info .= "\n" + let info .= "\n```\n" + let info .= "\n\n" + + let info .= "### SpaceVim Health checking :\n\n" + let info .= SpaceVim#health#report() + let info .= "\n\n" + + let info .= "### SpaceVim runtime log :\n\n" + let info .= "```log\n" let l = a:0 > 0 ? a:1 : 1 if filereadable(s:logger_file) let logs = readfile(s:logger_file, '') - return info . join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") + let info .= join(filter(logs, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") else let info .= '[ SpaceVim ] : logger file ' . s:logger_file . ' does not exists, only log for current process will be shown!' let info .= join(filter(s:log_temp, "v:val =~# '\[ SpaceVim \] \[\d\d\:\d\d\:\d\d\] \[" . s:levels[l] . "\]'"), "\n") - return info endif + let info .= "\n```\n" + return info endfunction ""