From 9118a18d5d72ac1814faf9dcba0635560800eb5f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 15 Apr 2019 17:42:58 +0200 Subject: Change completions option docstring element to be an arbitrary command We can have the previous behaviour by just passing the docstring to `info -placement menu`. --- rc/tools/python/jedi.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc/tools/python') diff --git a/rc/tools/python/jedi.kak b/rc/tools/python/jedi.kak index a0fe9449..f86a20f2 100644 --- a/rc/tools/python/jedi.kak +++ b/rc/tools/python/jedi.kak @@ -21,7 +21,7 @@ define-command jedi-complete -docstring "Complete the current selection" %{ 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("|", "\\|") + "|" + str(c.docstring()).replace("|", "\\|") + "|" + str(c.name).replace("|", "\\|")).replace("~", "~~").replace("'", "''") + "'" for c in script.completions()])) + 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()])) END ) printf %s\\n "evaluate-commands -client ${kak_client} %~echo completed; set-option %{buffer=${kak_buffile}} jedi_completions ${header} ${compl}~" | kak -p ${kak_session} -- cgit v1.2.3