diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index c2388a4..10afd00 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,17 +1,43 @@
### Issue
+
+
### Steps to reproduce
-### Versions
+
+
+### Output of “:verbose JediDebugInfo”
+
+
diff --git a/autoload/jedi.vim b/autoload/jedi.vim
index 264dfd1..6ca7a0f 100644
--- a/autoload/jedi.vim
+++ b/autoload/jedi.vim
@@ -166,6 +166,11 @@ function! jedi#debug_info() abort
if s:python_version ==# 'null'
call s:init_python()
endif
+ if &verbose
+ if &filetype !=# 'python'
+ echohl WarningMsg | echo 'You should run this in a buffer with filetype "python".' | echohl None
+ endif
+ endif
echo '#### Jedi-vim debug information'
echo 'Using Python version:' s:python_version
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
@@ -180,8 +185,8 @@ function! jedi#debug_info() abort
echohl None
else
PythonJedi << EOF
-vim.command("echo printf(' - sys.version: %s', {0!r})".format(', '.join([x.strip() for x in __import__('sys').version.split('\n')])))
-vim.command("echo printf(' - site module: %s', {0!r})".format(__import__('site').__file__))
+vim.command("echo printf(' - sys.version: `%s`', {0!r})".format(', '.join([x.strip() for x in __import__('sys').version.split('\n')])))
+vim.command("echo printf(' - site module: `%s`', {0!r})".format(__import__('site').__file__))
try:
jedi_vim
@@ -193,18 +198,18 @@ else:
vim.command("echo 'ERROR: the \"jedi\" Python module could not be imported.'")
vim.command("echo printf(' The error was: %s', {0!r})".format(getattr(jedi_vim, "jedi_import_error", "UNKNOWN")))
else:
- vim.command("echo printf('Jedi path: %s', {0!r})".format(jedi_vim.jedi.__file__))
+ vim.command("echo printf('Jedi path: `%s`', {0!r})".format(jedi_vim.jedi.__file__))
vim.command("echo printf(' - version: %s', {0!r})".format(jedi_vim.jedi.__version__))
vim.command("echo ' - sys_path:'")
for p in jedi_vim.jedi.Script('')._evaluator.sys_path:
- vim.command("echo printf(' - %s', {0!r})".format(p))
+ vim.command("echo printf(' - `%s`', {0!r})".format(p))
except Exception as e:
vim.command("echo printf('There was an error accessing jedi_vim.jedi: %s', {0!r})".format(e))
EOF
endif
- echo 'jedi-vim git version: '
+ echo ' - jedi-vim git version: '
echon substitute(system('git -C '.s:script_path.' describe --tags --always --dirty'), '\v\n$', '', '')
- echo 'jedi git submodule status: '
+ echo ' - jedi git submodule status: '
echon substitute(system('git -C '.s:script_path.' submodule status'), '\v\n$', '', '')
echo "\n"
echo '##### Settings'
@@ -222,6 +227,26 @@ EOF
echo "\n"
verb set omnifunc? completeopt?
echo '```'
+
+ if &verbose
+ echo "\n"
+ echo '#### :version'
+ echo '```'
+ version
+ echo '```'
+ echo "\n"
+ echo '#### :messages'
+ echo '```'
+ messages
+ echo '```'
+ echo "\n"
+ echo ":scriptnames
"
+ echo "\n"
+ echo '```'
+ scriptnames
+ echo '```'
+ echo " "
+ endif
endfunction
function! jedi#force_py_version(py_version) abort
diff --git a/plugin/jedi.vim b/plugin/jedi.vim
index 6823c7d..e224014 100644
--- a/plugin/jedi.vim
+++ b/plugin/jedi.vim
@@ -32,7 +32,7 @@ endif
" Pyimport command
command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import()
-command! -nargs=0 JediDebugInfo call jedi#debug_info()
+command! -nargs=0 -bar JediDebugInfo call jedi#debug_info()
command! -nargs=0 -bang JediClearCache call jedi#clear_cache(0)
" vim: set et ts=4: