diff --git a/README.md b/README.md index a76f6536e74db11d0ea97ca835479405eb80e7be..9e45a83f82b6c806d9102ecb4dbca9827523bae0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **An agent-based, socio-economic-ecological model of agricultural landscapes in Europe under the CAP.** - + ## Description Persephone models farmers' decision making and its impact on species in agricultural @@ -15,13 +15,13 @@ It is currently in the very early stages of development. Install the latest version of the [Julia](https://julialang.org/downloads/) programming language. The recommended editors are [VSCode](https://www.julia-vscode.org/) or -[Emacs](https://www.emacswiki.org/emacs/JuliaProgrammingLanguage). -Then, open a Julia commandline and install the -[Agents.jl](https://juliadynamics.github.io/Agents.jl/stable/) framework using -`using Pkg; Pkg.add("Agents")`. +[Emacs](https://www.emacswiki.org/emacs/JuliaProgrammingLanguage) (see `docs/editors.md`). Run the simulation by executing `run.jl` from the commandline, or loading it from -within a Julia REPL with `include("run.jl")`. +within a Julia REPL with `include("run.jl")`. All dependencies should be +automatically installed. + +This model uses the [Agents.jl](https://juliadynamics.github.io/Agents.jl/stable/) framework. --- diff --git a/docs/editors.md b/docs/editors.md new file mode 100644 index 0000000000000000000000000000000000000000..6073999904edf9271255ccb6a5f3e875769f7243 --- /dev/null +++ b/docs/editors.md @@ -0,0 +1,34 @@ +# Julia editors + +## Emacs + +There are a couple of addons that make working with Julia much nicer in Emacs: + +1. `julia-mode` gives syntax highlighting. Install with `M-x package-install julia-mode`. + +2. [`julia-snail`](https://github.com/gcv/julia-snail) provides IDE-like features, + especially a fully-functional REPL and the ability to evaluate code straight from inside a buffer. + Note that the installation can be somewhat tricky. You first need to manually install + all the dependencies of its dependency [vterm](https://github.com/akermu/emacs-libvterm), + then install vterm itself with `M-x package-install vterm`, *before* you can do + `M-x package-install julia-snail`. Then add it to your `init.el` with + `(require 'julia-snail)` and `(add-hook 'julia-mode-hook #'julia-snail-mode)`. + +3. [`Revise.jl`](https://timholy.github.io/Revise.jl/stable/) allows one to reload code + without restarting the Julia interpreter. Get it with `Pkg.add("Revise")`, then + add `using Revise` to `.julia/config/startup.jl` to have it automatically available. + +4. [`company-mode`](http://company-mode.github.io/) integrates with Snail to give code + completion. Install with `M-x package-install company`, then add + `(add-hook 'julia-mode-hook #'company-mode)` and + `(global-set-key (kbd "C-<tab>") 'company-complete)` to your `init.el`. + +5. [`magit`](https://magit.vc/) is a great git interface for Emacs. Install with + `M-x package-install magit` and add `(global-set-key (kbd "C-x g") 'magit-status)` + to your `init.el`. + +## VSCode + +See [here](https://www.julia-vscode.org/). + +*TODO: add more detail.*