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

REPLCompletions: allow completions for explicitly using-ed names #54610

Merged
merged 1 commit into from
May 31, 2024

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented May 29, 2024

The new feature usings=true added to names enhances REPL completions by allowing explicitly using-ed names to be found.

julia> using Base: @assume_effects

julia> @assu| # completes to `@assume_effects`

As a result, the implementation of REPL completions has been simplified. Additionally, it allows completion for names that are implicitly or explicitly using-ed in code specifying a module explicitly, such as:

julia> module A end

julia> A.signi| # completes to `A.significand`

@aviatesk aviatesk force-pushed the avi/using-completion branch from a8c9a86 to 135a048 Compare May 29, 2024 09:17
@aviatesk aviatesk force-pushed the avi/36529 branch 4 times, most recently from edb44e5 to 9f2e685 Compare May 30, 2024 19:17
@aviatesk aviatesk force-pushed the avi/using-completion branch from 65581ed to e11ebd7 Compare May 30, 2024 19:19
@giordano
Copy link
Contributor

giordano commented May 30, 2024

This doesn't fix #53999, the second submodule in a line like

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.12.0-DEV.632 (2024-05-30)
 _/ |\__'_|_|_|\__'_|  |  avi/using-completion/e11ebd76b2* (fork: 2 commits, 0 days)
|__/                   |

julia> using Base.Sort, Base.Th<TAB>

is still not completed.

@giordano giordano added the REPL Julia's REPL (Read Eval Print Loop) label May 31, 2024
Base automatically changed from avi/36529 to master May 31, 2024 05:42
The new feature `usings=true` added to `names` enhances REPL completions
by allowing explicitly `using`-ed names to be found.
```julia
julia> using Base: @assume_effects

julia> @assu| # completes to `@assume_effects`
```

As a result, the implementation of REPL completions has been simplified.
Additionally, it allows completion for names that are implicitly or
explicitly `using`-ed in code specifying a module explicitly, such as:
```julia
julia> module A end

julia> A.signi| # completes to `A.significand`
```

- fixes #29275
- fixes #40356
- fixes #49109
- fixes #53524
@aviatesk aviatesk force-pushed the avi/using-completion branch from e11ebd7 to 9c307ff Compare May 31, 2024 05:45
@aviatesk aviatesk merged commit 8d3b905 into master May 31, 2024
5 of 7 checks passed
@aviatesk aviatesk deleted the avi/using-completion branch May 31, 2024 06:55
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
…uliaLang#54610)

The new feature `usings=true` added to `names` enhances REPL completions
by allowing explicitly `using`-ed names to be found.
```julia
julia> using Base: @assume_effects

julia> @assu| # completes to `@assume_effects`
```

As a result, the implementation of REPL completions has been simplified.
Additionally, it allows completion for names that are implicitly or
explicitly `using`-ed in code specifying a module explicitly, such as:
```julia
julia> module A end

julia> A.signi| # completes to `A.significand`
```

- fixes JuliaLang#29275
- fixes JuliaLang#40356
- fixes JuliaLang#49109
- fixes JuliaLang#53524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
2 participants