From ce6e656386b6672ac8353c8090172e63c90c749c Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Mon, 11 Mar 2024 16:57:29 -0700 Subject: [PATCH] only use type completor w/irb when available --- .config/irb/irbrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/irb/irbrc b/.config/irb/irbrc index 84c0751..c9d14f3 100644 --- a/.config/irb/irbrc +++ b/.config/irb/irbrc @@ -9,8 +9,12 @@ IRB.conf[:PROMPT][:ALPHA] = { } IRB.conf[:PROMPT_MODE] = :ALPHA -# needs prism and rbs -IRB.conf[:COMPLETOR] = :type +# use type completor if available +begin + require "repl_type_completor" + IRB.conf[:COMPLETOR] = :type +rescue LoadError +end if defined?(Reline::Face) # https://github.com/ruby/irb/issues/328 Reline::Face.config(:completion_dialog) do |conf|