From b5f6a9b22731c0393bae7271d943a90e1ad05489 Mon Sep 17 00:00:00 2001 From: Martin Chaine Date: Mon, 6 Mar 2017 22:30:59 +0100 Subject: [PATCH 1/2] escape pipe from closure in the description --- rc/extra/racer.kak | 1 + 1 file changed, 1 insertion(+) diff --git a/rc/extra/racer.kak b/rc/extra/racer.kak index f98b92352..218f18b54 100644 --- a/rc/extra/racer.kak +++ b/rc/extra/racer.kak @@ -22,6 +22,7 @@ def racer-complete -docstring "Complete the current selection with racer" %{ word = $2 type = $7 desc = substr($9, 2, length($9) - 2) + gsub(/\|/, "\\|", desc) gsub(/\\n/, "\n", desc) menu = $8 sub(/^pub /, "", menu) From b5a9979bfb3da7efacecca775b3ded384238452e Mon Sep 17 00:00:00 2001 From: Martin Chaine Date: Tue, 7 Mar 2017 09:55:22 +0100 Subject: [PATCH 2/2] also handle enums explicitly --- rc/extra/racer.kak | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc/extra/racer.kak b/rc/extra/racer.kak index 218f18b54..6df2ab0be 100644 --- a/rc/extra/racer.kak +++ b/rc/extra/racer.kak @@ -31,6 +31,11 @@ def racer-complete -docstring "Complete the current selection with racer" %{ sub(word, "{default+e}" word "{default+d}", menu) menu = "{default+d}" menu word = word "(" + } else if (type == "Enum") { + menu = substr(menu, 0, length(menu) - 2) + sub(word, "{default+e}" word "{default+d}", menu) + menu = "{default+d}" menu + word = word "::" } else { menu = "{default+e}" word "{default+d} " menu }