Jedi: add a jedi_python_path str-list option
This commit is contained in:
parent
548e10597c
commit
f8e64ba29f
|
@ -1,5 +1,6 @@
|
||||||
decl -hidden str jedi_tmp_dir
|
decl -hidden str jedi_tmp_dir
|
||||||
decl -hidden str-list jedi_completions
|
decl -hidden str-list jedi_completions
|
||||||
|
decl str-list jedi_python_path ''
|
||||||
|
|
||||||
def jedi-complete -docstring "Complete the current selection with jedi" %{
|
def jedi-complete -docstring "Complete the current selection with jedi" %{
|
||||||
%sh{
|
%sh{
|
||||||
|
@ -15,6 +16,7 @@ def jedi-complete -docstring "Complete the current selection with jedi" %{
|
||||||
cd $(dirname ${kak_buffile})
|
cd $(dirname ${kak_buffile})
|
||||||
header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
|
header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
|
||||||
|
|
||||||
|
export PYTHONPATH="$kak_opt_jedi_python_path:$PYTHONPATH"
|
||||||
compl=$(python 2> "${dir}/fifo" <<-END
|
compl=$(python 2> "${dir}/fifo" <<-END
|
||||||
import jedi
|
import jedi
|
||||||
script=jedi.Script(open('$dir/buf', 'r').read(), $kak_cursor_line, $kak_cursor_column - 1, '$kak_buffile')
|
script=jedi.Script(open('$dir/buf', 'r').read(), $kak_cursor_line, $kak_cursor_column - 1, '$kak_buffile')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user