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

Introduction

Last verified against: LSP CLI accepts --stdio (vscode-languageclient); size-gated extracted analysis mode (spiceLsp.analysisMode / extractedByteThreshold); document formatting (textDocument/formatting + spice-lsp format); go-to-definition on .lib / .include; include/lib resolution; multi-dialect hover (default HSPICE); completion and connectivity still planned

spice-lsp is a language server and VS Code extension for SPICE circuit netlists. It gives you editor feedback while you write .cir, .sp, .spf, .inc, .lib, and related files — without running a simulator.

Use it when you want syntax and semantic checks, navigation, and dialect-aware help in the same place you edit the netlist.

What you get

CapabilityWhat it does
DiagnosticsSyntax errors plus warnings for duplicate names, unknown models/subcircuits, missing includes, and bad .lib sections
OutlineDocument symbols for subcircuits, models, parameters, and instances
Go to definition / find referencesJump between .subckt / .model / .param definitions and their uses; also jump from .include / .lib paths (and .lib entry names) into the target file or section
Include and library resolutionFollow .include / .inc and HSPICE .lib 'file' entry so models and subcircuits in other files participate in checks and navigation
HoverDialect reference docs (HSPICE by default) plus file-local detail for subcircuit pins and in-file models
Dialect selectionChoose HSPICE, Ngspice, or LTspice (spiceLsp.dialect) so hover and related behavior match your simulator
FormattingColumnar instance alignment, + wrap, directive keyword casing via Format Document or spice-lsp format

The VS Code extension starts the spice-lsp binary over stdio. The same binary works with any LSP-capable editor.

Install and try it

VS Code: install SPICE Language Support from the Marketplace, open a netlist, and edit — diagnostics and navigation should appear without extra setup.

From source: see Getting Started for the pixi workflow (pixi install, pixi run build, pixi run spice-lsp).

Configure search paths for shared model libraries with spiceLsp.libraryPaths. Details: Include and library resolution.

Why spice-lsp

SPICE netlists are text, but most editors treat them as plain files. spice-lsp is built so that:

  • Feedback stays in the editor — no simulator round-trip for common mistakes
  • The core is editor-agnostic (LSP); VS Code is the first client
  • Dialect differences are first-class — hover and settings follow HSPICE, Ngspice, or LTspice
  • Include and .lib chains are part of analysis, matching how real decks are structured

Goals and non-goals: Principles. Known gaps: Limitations.

Documentation map

If you want…Read
Setup, first run, editor installGetting Started
What the server implementsLSP Features
How crates and the pipeline fit togetherArchitecture
.include / .lib behaviorInclude and Library Resolution
Dialect docs and net semanticsDialect Reference and Net Semantics
Per-dialect reference pagesDialect reference catalog
Formatting rules and CLIFormatter
Building from source / CIBuild
Extension layout and publishingVS Code Integration

Repository quick start: README.md.