Options:
- Global option: g:jedi#case_insensitive_completion
- Buffer-local option: b:jedi_case_insensitive_completion
Values:
- 0 to disable case insensitive completion.
- 1 to enable case insensitive completion (default).
- the common case is having an exception here (with no buffer setting),
which results in the exception handler always
- vim_eval has overhead, especially with Neovim, so the less calls the
better
This patch changes it to query the `b:` dict, using the (always
set/initialized) global setting as the default.
Without this it would not go there with an already open qf window, and
would go to an unexpected buffer line instead of selecting the entry.
This is a follow-up to b689409, where it was decided that it should
always require the user to select an entry.
An exception is when the same usages are used again: then it will select
the nearest/current entry only (via ":cc").
I am seeing `p` twice for os.path.dirname, which seems to come from
Lib/posixpath.py and Lib/ntpath.py, as can be seen with `os.path.join`,
where I still see two with this patch:
```
(path, *paths)
import os (a, *p)
os.path.join()
```
* 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]
- cache current environment
- s/jedi.get_python_environment/jedi.get_system_environment: the former
does not exist (renamed in https://github.com/davidhalter/jedi/commit/336087f)
- improve error display