only use type completor w/irb when available

main
Alpha Chen 6 months ago
parent 0c084a33fe
commit ce6e656386
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -9,8 +9,12 @@ IRB.conf[:PROMPT][:ALPHA] = {
} }
IRB.conf[:PROMPT_MODE] = :ALPHA IRB.conf[:PROMPT_MODE] = :ALPHA
# needs prism and rbs # use type completor if available
IRB.conf[:COMPLETOR] = :type begin
require "repl_type_completor"
IRB.conf[:COMPLETOR] = :type
rescue LoadError
end
if defined?(Reline::Face) # https://github.com/ruby/irb/issues/328 if defined?(Reline::Face) # https://github.com/ruby/irb/issues/328
Reline::Face.config(:completion_dialog) do |conf| Reline::Face.config(:completion_dialog) do |conf|

Loading…
Cancel
Save