Skip calls to `jedi_vim.show_call_signatures` if the (position of the) current
function's argument did not change (by means of comma positions before
and after the cursor).
Ref: https://github.com/davidhalter/jedi-vim/pull/420
This will use CursorHoldI instead of CursorMovedI for displaying call
signatures, with a delay of 500ms by default.
This greatly enhances the experience with slow call signatures while typing
(depending on how fast Jedi is for the given context).
This is meant to be used in case you want to re-init the Python version
used by jedi-vim, without restarting Vim.
I had this laying around.. it might be better to just export
`s:init_python` as `jedi#init_python`?!
This makes it work in tests. Using `<expr>` instead will not trigger
the expansion of the mapping.
This is likely a bug in vim-vspec; I have tried 1.4.1 (currently pinned)
and 1.6.1.
Commit 8016665 escaped the newlines in `text`, which requires to use the
escaped version with `text.index` and `len`, too.
This fixes the following error:
Traceback (most recent call last):
File "…/jedi/jedi_vim.py", line 110, in wrapper
return func(*args, **kwargs)
File "…/jedi/jedi_vim.py", line 414, in cmdline_call_signatures
left = text.index(params[index])
ValueError: substring not found
This adds g:jedi#goto_command, and uses `<Leader>d` by default for it -
the old default for `g:jedi#goto_definitions_command`, which is now
empty.
It will try `script.goto_definitions()` first, and falls back to
`script.goto_assignments()` for builtins.
Closes https://github.com/davidhalter/jedi-vim/pull/407
This adds a visual mode map for renaming, which asks for the new name
via input().
`rename` itself could be changed to use `input()`, too - but I've left
it for now.
`self.message` is used in `__str__`.
Without this, tracebacks end like this:
Traceback (most recent call last):
[...]
File "…/vim/neobundles/jedi/jedi_vim.py", line 87, in _catch_
exception
raise VimError(result['exception'], result['throwpoint'], string)
jedi_vim.VimError: <unprintable VimError object>
This deletes the selection (by going to visual mode, and "c"), and then
triggers the completion.
This is useful with e.g. UltiSnips, when you want to start completion
with an expanded snippet argument selected.
Ref: https://github.com/davidhalter/jedi-vim/pull/339#issuecomment-97612632
- jedi#init_python is used to init the Python environment.
- jedi#setup_py_version is the single point where PythonJedi is
defined, and will configure `PythonJedi` to output an error in case
initialization failed.
- jedi#force_py_version_switch will throw an error when
g:jedi#force_py_version is not handled (e.g. invalid or "auto" and
unresolved).
- When g:jedi#force_py_version is provided, it will be used always.
- Use WarningMsg highlight for errors, which are centralized and
handled through exceptions.
Without this, the <C-x><C-o> triggered by jedi-vim would cause the first
match to be inserted (and selected). When using completopt=longest,
this was less so an issue.