mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
enforce using jedi 0.7
This commit is contained in:
@@ -18,7 +18,7 @@ def echo_highlight(msg):
|
||||
vim.command('echohl WarningMsg | echom "%s" | echohl None' % msg)
|
||||
|
||||
|
||||
if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 6, 0):
|
||||
if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 7, 0):
|
||||
echo_highlight('Please update your Jedi version, it is to old.')
|
||||
|
||||
|
||||
@@ -311,6 +311,7 @@ def rename():
|
||||
vim.current.window.cursor = cursor
|
||||
echo_highlight('Jedi did %s renames!' % len(temp_rename))
|
||||
|
||||
|
||||
def py_import():
|
||||
# args are the same as for the :edit command
|
||||
args = shsplit(vim.eval('a:args'))
|
||||
@@ -324,6 +325,7 @@ def py_import():
|
||||
cmd_args = ' '.join([a.replace(' ', '\\ ') for a in args])
|
||||
new_buffer(path, cmd_args)
|
||||
|
||||
|
||||
def py_import_completions():
|
||||
argl = vim.eval('a:argl')
|
||||
try:
|
||||
@@ -337,6 +339,7 @@ def py_import_completions():
|
||||
comps = ['%s%s' % (argl, c.complete) for c in script.completions()]
|
||||
vim.command("return '%s'" % '\n'.join(comps))
|
||||
|
||||
|
||||
def new_buffer(path, options=''):
|
||||
path = repr(PythonToVimStr(path))
|
||||
vim.eval("jedi#new_buffer(%s, '%s')" % (path, options))
|
||||
|
||||
Reference in New Issue
Block a user