Skip to content

Commit 673e67c

Browse files
committed
add instructions to switch julia executable
Document how to configure Julia executable for tasks using environment variables, direnv, or shell configuration. Add editor and environment files to gitignore.
1 parent 635fd2b commit 673e67c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.DS_Store
2+
.zed
23
grammars
34
*.wasm
45
target
6+
.envrc

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,33 @@ executing the ``zed: extensions`` command (click Zed->Extensions).
1515
The Julia Zed extension looks for your Julia binary in the standard locations.
1616
Make sure that the Julia binary is on your ``PATH``.
1717

18+
### Configuring the Julia executable for tasks
19+
20+
By default, Zed tasks (like running tests) use the `julia` command from your PATH.
21+
You can customize which Julia executable is used by setting the `julia` environment variable:
22+
23+
1. **In your shell configuration** (`.bashrc`, `.zshrc`, etc.):
24+
```bash
25+
export julia="/path/to/custom/julia"
26+
```
27+
28+
2. **When launching Zed from the terminal**:
29+
```bash
30+
julia="/path/to/custom/julia" zed .
31+
```
32+
33+
3. **Using direnv** (automatically supported by Zed):
34+
- Create a `.envrc` file in your project root with:
35+
> .envrc
36+
```
37+
JULIA_HOME="path/to/julia/directory"
38+
PATH_add "$JULIA_HOME/bin"
39+
export julia="$JULIA_HOME/bin/julia"
40+
```
41+
- Run `direnv allow` to approve the file
42+
43+
This allows you to use different Julia versions for different projects or to
44+
specify a Julia installation that's not on your PATH.
1845
1946
### Contributing
2047

0 commit comments

Comments
 (0)