mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
Improve GitHub issue template and JediDebugInfo
This commit is contained in:
committed by
Dave Halter
parent
682f37792d
commit
2ee9ec64d3
42
.github/ISSUE_TEMPLATE.md
vendored
42
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,17 +1,43 @@
|
|||||||
### Issue
|
### Issue
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please describe the issue here.
|
||||||
|
|
||||||
|
If you are not using jedi-vim from Git (but e.g. from a distribution's package,
|
||||||
|
please try it with jedi-vim's Git master, too).
|
||||||
|
-->
|
||||||
|
|
||||||
### Steps to reproduce
|
### Steps to reproduce
|
||||||
|
|
||||||
### Versions
|
<!--
|
||||||
|
Include if relevant.
|
||||||
|
|
||||||
- jedi-vim:
|
Please provide steps to reproduce it here, preferably based on a minimal Vim
|
||||||
- Vim / Neovim:
|
configuration.
|
||||||
- Python:
|
|
||||||
|
|
||||||
In case you are not using jedi-vim from Git master, please test it there, too.
|
You can use the following template (save it as `minimal.vimrc`, and run Vim
|
||||||
|
with `vim -u minimal.vimrc`):
|
||||||
|
|
||||||
### Output of the "JediDebugInfo" command (in a Python buffer)
|
```
|
||||||
|
set nocompatible
|
||||||
|
|
||||||
### Output of the "messages" Vim command
|
let script_dir = fnamemodify(expand('<sfile>'), ':h')
|
||||||
|
let &runtimepath .= ','.script_dir.','.script_dir.'/after'
|
||||||
|
|
||||||
### Output of "scriptnames" Vim command
|
" Put your config changes here.
|
||||||
|
" let g:jedi#show_call_signatures=1
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
filetype plugin indent on
|
||||||
|
```
|
||||||
|
|
||||||
|
Please provide the `minimal.vimrc` you have used here, too.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Output of “:verbose JediDebugInfo”
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Please execute `:redir @+> | silent verb JediDebugInfo | redir END` in a
|
||||||
|
Python buffer to copy debug information into your clipboard.
|
||||||
|
Then paste it here.
|
||||||
|
-->
|
||||||
|
|||||||
@@ -166,6 +166,11 @@ function! jedi#debug_info() abort
|
|||||||
if s:python_version ==# 'null'
|
if s:python_version ==# 'null'
|
||||||
call s:init_python()
|
call s:init_python()
|
||||||
endif
|
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 '#### Jedi-vim debug information'
|
||||||
echo 'Using Python version:' s:python_version
|
echo 'Using Python version:' s:python_version
|
||||||
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
|
let pyeval = s:python_version == 3 ? 'py3eval' : 'pyeval'
|
||||||
@@ -180,8 +185,8 @@ function! jedi#debug_info() abort
|
|||||||
echohl None
|
echohl None
|
||||||
else
|
else
|
||||||
PythonJedi << EOF
|
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(' - 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(' - site module: `%s`', {0!r})".format(__import__('site').__file__))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
jedi_vim
|
jedi_vim
|
||||||
@@ -193,18 +198,18 @@ else:
|
|||||||
vim.command("echo 'ERROR: the \"jedi\" Python module could not be imported.'")
|
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")))
|
vim.command("echo printf(' The error was: %s', {0!r})".format(getattr(jedi_vim, "jedi_import_error", "UNKNOWN")))
|
||||||
else:
|
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 printf(' - version: %s', {0!r})".format(jedi_vim.jedi.__version__))
|
||||||
vim.command("echo ' - sys_path:'")
|
vim.command("echo ' - sys_path:'")
|
||||||
for p in jedi_vim.jedi.Script('')._evaluator.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:
|
except Exception as e:
|
||||||
vim.command("echo printf('There was an error accessing jedi_vim.jedi: %s', {0!r})".format(e))
|
vim.command("echo printf('There was an error accessing jedi_vim.jedi: %s', {0!r})".format(e))
|
||||||
EOF
|
EOF
|
||||||
endif
|
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$', '', '')
|
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$', '', '')
|
echon substitute(system('git -C '.s:script_path.' submodule status'), '\v\n$', '', '')
|
||||||
echo "\n"
|
echo "\n"
|
||||||
echo '##### Settings'
|
echo '##### Settings'
|
||||||
@@ -222,6 +227,26 @@ EOF
|
|||||||
echo "\n"
|
echo "\n"
|
||||||
verb set omnifunc? completeopt?
|
verb set omnifunc? completeopt?
|
||||||
echo '```'
|
echo '```'
|
||||||
|
|
||||||
|
if &verbose
|
||||||
|
echo "\n"
|
||||||
|
echo '#### :version'
|
||||||
|
echo '```'
|
||||||
|
version
|
||||||
|
echo '```'
|
||||||
|
echo "\n"
|
||||||
|
echo '#### :messages'
|
||||||
|
echo '```'
|
||||||
|
messages
|
||||||
|
echo '```'
|
||||||
|
echo "\n"
|
||||||
|
echo "<details><summary>:scriptnames</summary>"
|
||||||
|
echo "\n"
|
||||||
|
echo '```'
|
||||||
|
scriptnames
|
||||||
|
echo '```'
|
||||||
|
echo "</details>"
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! jedi#force_py_version(py_version) abort
|
function! jedi#force_py_version(py_version) abort
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ endif
|
|||||||
" Pyimport command
|
" Pyimport command
|
||||||
command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import(<q-args>)
|
command! -nargs=1 -complete=custom,jedi#py_import_completions Pyimport :call jedi#py_import(<q-args>)
|
||||||
|
|
||||||
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(<bang>0)
|
command! -nargs=0 -bang JediClearCache call jedi#clear_cache(<bang>0)
|
||||||
|
|
||||||
" vim: set et ts=4:
|
" vim: set et ts=4:
|
||||||
|
|||||||
Reference in New Issue
Block a user