Juno autocompletion doesn't work

I decided to give Juno a try and installed Atom and Juno, following the installation instructions on docs.junolab. Both are completely fresh installs, haven’t used either of them before on this PC.

I opened an existing project folder, but autocompletion just doesn’t work. Well, it does fill out the snippets listed in the language-julia package, and the latex completions but that’s it, no standard library functions / structs or other package completion.

I started a local julia procoess from the sidebar and then standard library autocompletion started working, but still nothing for other packages. Even the structs or functions defined in the same file don’t show up in autocompletion.

I found some threads talking about atom / package updates breaking Juno, but that isn’t the case for me since it’s a fresh install. The FAQ lists an issue with wrong precompile cache, I tried doing that too. Closed atom, opened a julia REPL, ran using Atom, exited julia, reopened atom. No change, still same issue.

Any help would be nice.

Juno’s autocompletion only looks at the state of your current Julia process (except for local completions), so you need to load whatever packages you want completions for.

I’m not sure what you mean by load a package? I do have using xyz written in my files whenever I use the packages.

And as I said, even the things written in the current file don’t get autocompleted.

struct Point
    x::Int
    y::Int
end

x = Poi

Nothing shows up to complete the Point. That’s the entirety of the file.

Right, you need to execute the definition (with e.g. Ctrl-Enter):
grafik

Same for modules or packages:
grafik

Local completions only work in actual local scopes (like functions):
grafik

I see… So it’s loading everything into an actual julia session and getting the completions from it?

I understand it now, but it’s really counter-intuitive to me. Seems like it should be documented somewhere that you have to actually run the code to get autocompletions.

We’ll, you’re loading code into the Julia session. But yes.
We’re doing some static analysis for packages etc if you’re in the scope of the package.

That’s fair. Do you feel like opening a PR against our documentation here?

I don’t get autocompletion even in a project folder (a project generated with Pkg, a Project.toml file and such) without loading the code into julia. I do get the static completion within functions as you said, but not within modules or packages.

Will do that, let me know under which section you’d like it to be.

Thanks for taking the time to help! Another question if you don’t mind: Is there a way to prioritize the snippets over the keyword completions? For example, stru completes to just the struct keyword, if I want to use the struct-name-field-end snippet, I have to arrow key down to it.

FAQ is probably fine, I think.

You can play around with this setting:
grafik

Thank you!