Skip to content

Commit

Permalink
Merge pull request #20 from Pangoraw/update_to_nightly
Browse files Browse the repository at this point in the history
update to nightly changes
  • Loading branch information
pfitzseb authored Aug 16, 2024
2 parents 1e6f0f5 + 326cc65 commit 8c0964f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FuzzyCompletions"
uuid = "fb4132e2-a121-4a70-b8a1-d5b831dcdcc2"
authors = ["Shuhei Kadowaki <[email protected]>"]
version = "0.5.4"
version = "0.5.5"

[deps]
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Expand Down
16 changes: 12 additions & 4 deletions src/FuzzyCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ import REPL.REPLCompletions:
subscript_regex,
superscripts,
superscript_regex,
afterusing,
dict_identifier_key

@static if VERSION v"1.10.0-DEV.941"
Expand Down Expand Up @@ -460,7 +459,10 @@ function complete_keyword_argument(partial, last_idx, context_module)
end

suggestions = Completion[KeywordArgumentCompletion(kwarg, partial) for kwarg in kwargs]
repl_completions = @static if VERSION v"1.10.0-DEV.981"
repl_completions = @static if VERSION v"1.12.0-DEV.639"
REPL.REPLCompletions.complete_symbol!(REPL.REPLCompletions.Completion[],
nothing, last_word, context_module)
elseif VERSION v"1.10.0-DEV.981"
REPL.REPLCompletions.complete_symbol(nothing, last_word, Returns(true), context_module)
else
REPL.REPLCompletions.complete_symbol(last_word, (mod,x)->true, context_module)
Expand Down Expand Up @@ -601,7 +603,13 @@ end

end # @static if isdefined(Base, :TOML)

function completions(string::String, pos::Int, context_module::Module = Main, shift::Bool=true;
after_using_or_import(string, startpos) = @static if VERSION v"1.12.0-DEV.699"
REPL.REPLCompletions.get_import_mode(string) (:using_module, :import_module)
else
REPL.REPLCompletions.afterusing(string, startpos)
end

function completions(string::String, pos::Int, context_module::Module = Main, shift::Bool=true;
enable_questionmark_methods::Bool = true,
enable_dict_keys::Bool = true,
enable_expanduser::Bool = true,
Expand Down Expand Up @@ -741,7 +749,7 @@ function completions(string::String, pos::Int, context_module::Module = Main, sh
ffunc = (mod,x)->true
suggestions = Completion[]
comp_keywords = true
if enable_packages && afterusing(string, startpos)
if enable_packages && after_using_or_import(string, startpos)
# We're right after using or import. Let's look only for packages
# and modules we can reach from here

Expand Down

2 comments on commit 8c0964f

@pfitzseb
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/113232

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.5 -m "<description of version>" 8c0964fb744ce1318bc72bc23b675c7a998eb539
git push origin v0.5.5

Please sign in to comment.