diff options
author | tomoya ishida <tomoyapenguin@gmail.com> | 2023-11-08 11:46:24 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-08 02:46:33 +0000 |
commit | e34401046566ad1938b1eec654a6bf69b1319102 (patch) | |
tree | 27515a6c6e783818906480910d27fab3c6e41e97 /lib/irb.rb | |
parent | 7ed37388fb9c0e85325b4e3db2ffbfca3f4179ad (diff) | |
download | ruby-e34401046566ad1938b1eec654a6bf69b1319102.tar.gz |
[ruby/irb] Type based completion using Prism and RBS
(https://github.com/ruby/irb/pull/708)
* Add completor using prism and rbs
* Add TypeCompletion test
* Switchable completors: RegexpCompletor and TypeCompletion::Completor
* Add completion info to irb_info
* Complete reserved words
* Fix [*] (*) {**} and prism's change of KeywordParameterNode
* Fix require, frozen_string_literal
* Drop prism<=0.16.0 support
* Add Completor.last_completion_error for debug report
* Retrieve `self` and `Module.nesting` in more safe way
* Support BasicObject
* Handle lvar and ivar get exception correctly
* Skip ivar reference test of non-self object in ruby < 3.2
* BaseScope to RootScope, move method objects constant under Methods
* Remove unused Splat struct
* Drop deeply nested array/hash type calculation from actual object. Now, calculation depth is 1
* Refactor loading rbs in test, change preload_in_thread not to cache Thread object
* Use new option added in prism 0.17.1 to parse code with localvars
* Add Prism version check and warn when :type completor cannot be enabled
* build_type_completor should skip truffleruby (because endless method definition is not supported)
https://github.com/ruby/irb/commit/1048c7ed7a
Diffstat (limited to 'lib/irb.rb')
-rw-r--r-- | lib/irb.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/irb.rb b/lib/irb.rb index d0688e6f9f..655abaf069 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -140,6 +140,10 @@ require_relative "irb/debug" # # IRB.conf[:USE_AUTOCOMPLETE] = false # +# To enable enhanced completion using type information, add the following to your +.irbrc+: +# +# IRB.conf[:COMPLETOR] = :type +# # === History # # By default, irb will store the last 1000 commands you used in |