diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-04-25 11:59:42 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-04-25 11:59:42 +0100 |
| commit | 0cc89b2b9f3cdeff960bd55a865ee0f52fa98d25 (patch) | |
| tree | bd4860272e271f215e4d9ba7d2049be9f44ac211 /rc/tools/python | |
| parent | 429eeb252c6e7ac8512c2bd98ed3b18c62d7f37b (diff) | |
| parent | f49644e8ee8b2450f28b82d74fcf823d81f2ae1c (diff) | |
Merge remote-tracking branch 'laelath/provides-requires'
Diffstat (limited to 'rc/tools/python')
| -rw-r--r-- | rc/tools/python/jedi.kak | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rc/tools/python/jedi.kak b/rc/tools/python/jedi.kak index f86a20f2..5f28ba64 100644 --- a/rc/tools/python/jedi.kak +++ b/rc/tools/python/jedi.kak @@ -1,3 +1,9 @@ +hook -once global BufSetOption filetype=python %{ + require-module jedi +} + +provide-module jedi %{ + declare-option -hidden str jedi_tmp_dir declare-option -hidden completions jedi_completions declare-option -docstring "colon separated list of path added to `python`'s $PYTHONPATH environment variable" \ @@ -17,7 +23,7 @@ define-command jedi-complete -docstring "Complete the current selection" %{ cd $(dirname ${kak_buffile}) header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}" - export PYTHONPATH="$kak_opt_jedi_python_path:$PYTHONPATH" + export PYTHONPATH="$kak_opt_jedi_python_path:$PYTHONPATH" compl=$(python 2> "${dir}/fifo" <<-END import jedi script=jedi.Script(open('$dir/buf', 'r').read(), $kak_cursor_line, $kak_cursor_column - 1, '$kak_buffile') @@ -45,3 +51,5 @@ define-command jedi-disable-autocomplete -docstring "Disable jedi completion" %{ remove-hooks window jedi-autocomplete unalias window complete jedi-complete } + +} |
