ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "hsbt (Hiroshi SHIBATA)" <noreply@ruby-lang.org>
Subject: [ruby-core:119437] [Ruby master Feature#20778] ruby/repl_type_completor as a bundled gem
Date: Fri, 04 Oct 2024 00:51:26 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-110057.20241004005126.10330@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20778.20241002175837.10330@ruby-lang.org>

Issue #20778 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Assigned to Closed

Thank you. I confirmed that.

----------------------------------------
Feature #20778: ruby/repl_type_completor as a bundled gem
https://bugs.ruby-lang.org/issues/20778#change-110057

* Author: tompng (tomoya ishida)
* Status: Closed
* Assignee: hsbt (Hiroshi SHIBATA)
----------------------------------------
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`




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

      parent reply	other threads:[~2024-10-04  0:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 17:58 [ruby-core:119410] " tompng (tomoya ishida) via ruby-core
2024-10-03  6:41 ` [ruby-core:119419] " hsbt (Hiroshi SHIBATA) via ruby-core
2024-10-03  7:25 ` [ruby-core:119423] " matz (Yukihiro Matsumoto) via ruby-core
2024-10-03  7:29 ` [ruby-core:119424] " hsbt (Hiroshi SHIBATA) via ruby-core
2024-10-03  9:05 ` [ruby-core:119427] " hsbt (Hiroshi SHIBATA) via ruby-core
2024-10-03 12:51 ` [ruby-core:119433] " tompng (tomoya ishida) via ruby-core
2024-10-04  0:51 ` hsbt (Hiroshi SHIBATA) via ruby-core [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-110057.20241004005126.10330@ruby-lang.org \
    --to=ruby-core@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).