Your first cell
In this step you create a library, open it in Neovim and the GUI, and draw two rectangles.
Create a library
arc new tutorial
cd tutorial
This creates three files:
tutorial/
├── Argon.toml # library manifest
├── tech.toml # units, layers, and display styles
└── lib.ar # Argon source
lib.ar starts with an empty top() cell. A cell is a layout definition you can call, like a parameterized block.
Open the editor
From the library directory:
argone .
This starts Neovim, the analyzer, and the GUI window. Neovim owns the source; the analyzer compiles it and sends the result to the GUI.
Click the canvas and press O. The command line opens with :Argon openCell filled in. Type top() and press Enter.
Replace the starter cell
Replace the contents of lib.ar with:
cell inset_rect() {
}
Press O again and open inset_rect(). You don't need to save first: the analyzer compiles the buffer as you type, and the canvas updates a moment after you stop.
Draw two rectangles
- Pick the
met2layer in the layer sidebar. - Press R and click two opposite corners.
- Pick
met1and draw a larger rectangle around the first. - Press Esc to return to selection mode.
Look at lib.ar in Neovim: each rectangle is now a rect call. The GUI writes into the buffer, not the file, so these edits can be undone like any other. The calls use initial values such as x0i and y1i, which is what lets you drag unconstrained edges later.
Check the project
arc fmt
arc check
Next, add constraints to replace the sketched positions with relationships.