When being initialized via ftplugin `set shortmess+=F` (default in
Neovim by now) causes the additional information (the full traceback) to
be silenced.
This patch uses `:unsilent` to always display it.
Ref: https://github.com/neovim/neovim/issues/8675
* jedi_vim.jedi_import_error: add location
This is useful for debugging. It contains e.g. the path to parso, if
importing failed from there.
Example:
> Error: jedi-vim failed to initialize Python: jedi#setup_python_imports: could not import jedi: cannot import name 'PythonTokenTypes' (in /…/jedi-vim/pythonx/jedi/jedi/api/completion.py:1). (in function jedi#init_python[3]..<SNR>44_init_python[27]..jedi#setup_python_imports, line 37)
* init: handle jedi_vim.jedi_import_error in Vim plugin
Using `set shortmess+=F` would suppress the `:echom` used in
`jedi_vim.no_jedi_warning` [1].
This patch makes `jedi#setup_python_imports` handle the error instead.
1: https://github.com/neovim/neovim/issues/8675
* Revisit error handling with loading jedi_vim
* jedi#debug_info: display parso submodule separately
* Fix jedi#reinit_python
* fixup! Revisit error handling with loading jedi_vim
* display_debug_info: handle exceptions with environment.get_sys_path
* fixup! Revisit error handling with loading jedi_vim
[ci skip]
It was removed previously, since it now refers to the environment being
used.
This brings it back for now.
There could be a separate var for it later, and/or it needs changes
later (or rather the environment needs a new variable name, since it
should refer to the executable really) - but this is good for now I think.
Fixes https://github.com/davidhalter/jedi-vim/issues/833
This allows vimlparser to parse the vim file again, and it is more
convenient to have it in a real Python file anyway.
Small refactoring and minor text changes included.
Move jedi_vim.py and the jedi submodule into pythonx, which gets added
to Vim's internal sys.path. While jedi cannot be imported directly from
there, it still makes sense for consistency.
This is relevant for when using `:JediDebuginfo` in a broken setup,
where the call to `jedi#init_python()` in the autoload file throws an
error already (but `jedi#debug_info` is defined/loaded before already).
Syntax highlighting on chars in g:jedi#call_signature_escape may
break the funciton parameter hint from jedi-vim. Change its default
value to non python syntax symbols to reduce chance of collision