When I open a Julia file in Atom my working directory is automatically set to my HOME directory. Thus I have to either explicitly code: cd(dirname(@__FILE__)) or use the following command: Julia Client: Work in File Folder. Is there a way to avoid this altogether and make it default behavior? I believe this is similar to the issues #490 and #124 . Yet it seems to have been resolved in issue #124.
When I create the file Example.jl with the following code:
What is the project folder? In other words, when you look at tree view (usually the view of files and folders on the left part of the window) are you seeing all the folders in your home folder or just Folder #1?
So when I open up a julia file in Atom by just double clicking it, no tree view pane shows up. When I select Tree View:Toggle command, a project pane pops up but I am not seeing any folders inside it. Here is a screenshot of what I am seeing:
Try adding a project folder there, or else right-click the folder of the project you’re working on and open it in atom. I’m guessing that because there’s no project folder, Juno is just defaulting to $HOME.
It would be nice if there could be some sort of Juno setting that we could select to automatically cd Julia to the directory containing the first-opened file (instead of going Julia → Working Directory → Current File’s Folder). It used to work this way before Atom updated to v1.36. I could understand if not everyone wants this behavior, but I think most people would and this should definitely be an option.
Well, maybe – I haven’t actually tried this. atom path/do/somewhere will add somewhere as a project folder in Atom, and Juno will start Julia processes in the first project folder by default.
There actually is a better solution though: Fill in the two following entries in julia-clients settings and you should be good to go.
Although Working Directory will be updated if you change the working dir through Juno (e.g. with the Work In File Folder command; cd in Julia doesn’t have an effect though).