Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

This chapter covers environment setup and the shortest path from clone to a running language server.

Prerequisites

ToolPurpose
pixiManages Rust, Node (for the VS Code extension), and build tasks
GitClone and contribute

You do not need a system-wide Rust install. Pixi provides the toolchain pinned in pixi.toml.

Clone and install

git clone https://github.com/amirhosseindavoody/spice-lsp.git
cd spice-lsp
pixi install

pixi install creates a reproducible environment with the Rust compiler and (once added) Node.js, mdBook, and other dev tools.

Verify the environment

pixi run rustc --version
pixi run cargo --version

Both commands should succeed and report Rust ≥ 1.96.

Build (after MVP scaffolding lands)

Once the Cargo workspace exists, build and test through pixi tasks:

pixi run build
pixi run test

Run the language server directly (it communicates over stdio — it will appear to hang; that is normal):

pixi run spice-lsp

Press Ctrl+C to stop.

Open sample netlists

Create or copy a minimal netlist for manual testing:

* demo.cir — Ngspice-style
.title Simple RC
R1 in out 1k
C1 out 0 1u
V1 in 0 DC 1
.tran 1u 1m
.end

Save as demo.cir in the repo root or under test-data/.

Editor integration (MVP)

VS Code (primary target)

  1. Build the LSP binary: pixi run build
  2. Open the extension folder: editors/vscode
  3. Install JS dependencies: npm install
  4. Press F5 to launch an Extension Development Host with the SPICE extension loaded
  5. Open demo.cir and confirm diagnostics appear

Full extension setup: VS Code integration.

Other editors

Any editor with generic LSP client support can point at the spice-lsp binary:

EditorConfiguration
Neovimlspconfig custom server block with cmd = { "spice-lsp" }
Helix[language-server.spice-lsp] in languages.toml
ZedExtension or lsp settings (once published)

File extensions to associate: .cir, .sp, .spf, .net, .ckt (dialect-dependent).

If you are new to the repo, follow this order:

  1. Read Principles — know what is in and out of scope for MVP
  2. Follow MVP guide — implement or review each milestone
  3. Use Demo and testing — verify each layer before adding features
  4. Read Architecture — understand where new code belongs
  5. Skim Dialect reference and net semantics — long-term hover and connectivity goals (not MVP)

Next steps