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

Start VS code with Julia repl running, and the environment initialized #1622

Open
PetrKryslUCSD opened this issue Aug 23, 2020 · 6 comments
Open

Comments

@PetrKryslUCSD
Copy link

When there is a Manifest.toml (and a Project.toml) in the root of the folder that you open with VS Code, it should automatically fire up the REPL, activate and instantiate the project. At least it should be an option.

@mthelm85
Copy link

Looks like this may be the way to get this done...??

https://code.visualstudio.com/api/references/activation-events

@PedroPizarro
Copy link

PedroPizarro commented Aug 23, 2020

If you put this:

using Pkg if isfile("Project.toml") && isfile("Manifest.toml") Pkg.activate(".") end

In your startup.jl, if there is a Project.toml and a Manifest.toml in the current folder, it's going to be activated.
So if you open up a folder in your Code and run julia in the terminal, the project will be activated.

I think there is a way of doing a statement to instantiate the project if necessary, but I've never though about it and searched for.

I don't know if this will help, because you still need to do a lot of stuff (open code, open the terminal and run julia) to do what you are asking for (if I understood correctly), but I use this config. and I like it.

@PetrKryslUCSD
Copy link
Author

Good thinking. It precisely fits my current need! (I want students to work with the IDE with the least amount of obstacles and things to do.)

@davidanthoff
Copy link
Member

I don't think that code should be needed: the extension already checks whether there is a Project.toml and Manifest.toml in the root folder, and if there is it will activate it.

So we'll just track adding some option to automatically start the REPL at startup in this issue here.

@davidanthoff davidanthoff added this to the Backlog milestone Aug 28, 2020
@logankilpatrick
Copy link
Member

I don't think that code should be needed: the extension already checks whether there is a Project.toml and Manifest.toml in the root folder, and if there is it will activate it.

This does not seem to be the case, I have a project and manifest file, when I open Julia, it is not activating the environment automatically.

@davidanthoff
Copy link
Member

Ah, true! We probably need to register the project file types as being handled by the extension and that they should activate the extension.

@davidanthoff davidanthoff removed this from the Backlog milestone Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants