summaryrefslogtreecommitdiff
path: root/rc/tools/python
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-04-28 08:14:52 +1000
committerMaxime Coste <mawww@kakoune.org>2021-04-28 08:14:52 +1000
commit3b147bca0aee95a3cf1870921a48c841c4f130ac (patch)
tree8d045f3d57917695ac907a905acc25cb219ca32c /rc/tools/python
parent970a0b8997202382139455022e31f3f1202f8524 (diff)
parentcd9b1e66f02bb7c341eb499d72eb5debfd6ce4c3 (diff)
Merge branch 'patch-1' of https://github.com/dzamo/kakoune
Diffstat (limited to 'rc/tools/python')
-rw-r--r--rc/tools/python/jedi.kak4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/tools/python/jedi.kak b/rc/tools/python/jedi.kak
index 14acbf32..1efdfe3a 100644
--- a/rc/tools/python/jedi.kak
+++ b/rc/tools/python/jedi.kak
@@ -26,8 +26,8 @@ define-command jedi-complete -docstring "Complete the current selection" %{
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')
- print(' '.join(["'" + (str(c.name).replace("|", "\\|") + "|info -style menu %!" + str(c.docstring()).replace("|", "\\|").replace("!", "!!") + "!|" + str(c.name).replace("|", "\\|")).replace("~", "~~").replace("'", "''") + "'" for c in script.completions()]))
+ script=jedi.Script(code=open('$dir/buf', 'r').read(), path='$kak_buffile')
+ print(' '.join(["'" + (str(c.name).replace("|", "\\|") + "|info -style menu %!" + str(c.docstring()).replace("|", "\\|").replace("!", "!!") + "!|" + str(c.name).replace("|", "\\|")).replace("~", "~~").replace("'", "''") + "'" for c in script.complete(line=$kak_cursor_line, column=$kak_cursor_column)]))
END
)
printf %s\\n "evaluate-commands -client ${kak_client} %~echo completed; set-option %{buffer=${kak_buffile}} jedi_completions ${header} ${compl}~" | kak -p ${kak_session}