Project

General

Profile

Actions

Feature #20778

closed

ruby/repl_type_completor as a bundled gem

Added by tompng (tomoya ishida) about 2 months ago. Updated about 2 months ago.

Status:
Closed
Target version:
-
[ruby-core:119410]

Description

When gem repl_type_completor is installed, irb --type-completor will provide better completion in IRB.

irb(main):001* [1, 2, 3].map(&:ch█
                             |:chr|
irb(main):001* [1, 2, 3].map(&:chr).each do |c|
irb(main):002*   puts c.ch█
irb(main):003> end   |c.chars |
                     |c.chomp |
                     |c.chomp!|
                     |c.chop  |
                     |c.chop! |
                     |c.chr   |

I believe this feature will provide powerful support especially to beginners, but it requires installation and setup. And what is important, you cannot activate this feature unless you know it exists.
If repl_type_completor is a bundled gem, and if IRB uses type-completor as default (https://github.com/ruby/irb/pull/1010), Ruby 3.4's IRB will provide great experience by default.

With bundler

When repl_type_completor is not added to Gemfile, fallback to regexp-based completion.
Force require: consider later.

Dependency

prism and rbs

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

  • Status changed from Open to Assigned
  • Assignee set to hsbt (Hiroshi SHIBATA)

Updated by matz (Yukihiro Matsumoto) about 2 months ago

Accepted. Looking forward to making it public.

Matz.

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

I'll support this.

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

I added repl_type_completor at https://github.com/ruby/ruby/commit/50b32a3c9206df2ec7bcb4c54a59844c27f1c144

@tompng (tomoya ishida) Can you add owner grant of https://rubygems.org/gems/repl_type_completor to me? I will not release without maintainer's approval. But I may release a new version of that gem for release process of Ruby when you and other maintainers cannot do that.

Updated by tompng (tomoya ishida) about 2 months ago

Thank you. I added owner grant.

Updated by hsbt (Hiroshi SHIBATA) about 2 months ago

  • Status changed from Assigned to Closed

Thank you. I confirmed that.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0