only use type completor w/irb when available
change
commit ce6e656386b6672ac8353c8090172e63c90c749c
author Alpha Chen <alpha@kejadlen.dev>
date
parent 0c084a33
diff --git a/.config/irb/irbrc b/.config/irb/irbrc
index 84c07517..c9d14f39 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|