Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Remove unnecessary escape from completor class names #1063

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ The setting may not be changed during the session.

### Type Based Completion

\IRB's default completion `\IRB::RegexpCompletor` uses Regexp. \IRB offers an experimental completion `\IRB::TypeCompletor` that uses type analysis.
\IRB's default completion `IRB::RegexpCompletor` uses Regexp. \IRB offers an experimental completion `IRB::TypeCompletor` that uses type analysis.

#### How to Enable \IRB::TypeCompletor
#### How to Enable IRB::TypeCompletor

Install [ruby/repl_type_completor](https://github.com/ruby/repl_type_completor/) with:

Expand Down Expand Up @@ -328,9 +328,9 @@ Completion: Autocomplete, RegexpCompletor

If you have a `sig/` directory or `rbs_collection.lock.yaml` in the current directory, \IRB will load it.

#### Advantage over Default \IRB::RegexpCompletor
#### Advantage over Default IRB::RegexpCompletor

\IRB::TypeCompletor can autocomplete chained methods, block parameters, and more if type information is available. These are some examples \IRB::RegexpCompletor cannot complete.
`IRB::TypeCompletor` can autocomplete chained methods, block parameters, and more if type information is available. These are some examples `IRB::RegexpCompletor` cannot complete.

```console
irb(main):001> 'Ruby'.upcase.chars.s # Array methods (sample, select, shift, size)
Expand All @@ -347,11 +347,11 @@ irb(main):002> def foo
irb(main):003> sa # save, save!
```

As a trade-off, completion calculation takes more time than \IRB::RegexpCompletor.
As a trade-off, completion calculation takes more time than `IRB::RegexpCompletor`.

#### Difference between Steep's Completion

Compared with Steep, \IRB::TypeCompletor has some differences and limitations.
Compared with Steep, `IRB::TypeCompletor` has some differences and limitations.
```ruby
[0, 'a'].sample.
# Steep completes the intersection of Integer methods and String methods
Expand All @@ -365,7 +365,7 @@ def f(arg = [0, 'a'].sample)
arg. # Completes both Integer and String methods
```

Unlike other static type checkers, \IRB::TypeCompletor uses runtime information to provide better completion.
Unlike other static type checkers, `IRB::TypeCompletor` uses runtime information to provide better completion.

```console
irb(main):001> a = [1]
Expand Down
Loading