Files
Lenny Khazan 9798fb08f3 Update VSCode extension (#41)
* Update VSCode extension

* fix lint

* lint

* lint
2025-07-21 23:59:10 -04:00
..
2025-07-21 23:59:10 -04:00
2025-07-21 23:59:10 -04:00
2025-07-05 01:51:29 -04:00
2025-07-05 01:51:29 -04:00
2025-07-05 01:51:29 -04:00
2025-07-05 01:51:29 -04:00
2025-07-12 13:24:55 -04:00
2025-07-12 13:24:55 -04:00
2025-07-05 01:51:29 -04:00
2025-07-05 01:51:29 -04:00

Zener VS Code LSP extension

A VSCode LSP extension that talks over stdin/stdout to a binary. This can either be the pcb binary itself, or any binary that has implemented starlark::lsp::server::LspContext and runs starlark::lsp::server::stdio_server().

If using another binary, the settings to be aware of are zener.lspPath (the binary path) and zener.lspArguments (the arguments to that binary). These are available in the VSCode extension settings UI.

Based on a combination of:

Pre-requisites

You need to have npm v7+ installed. Afterwards, run npm install in this folder and in client.

Debugging

  • Follow steps in Pre-requisites section.
  • Open VS Code on this folder.
  • Press Ctrl+Shift+B to compile the client and server.
  • Switch to the Debug viewlet.
  • Select Launch Client from the drop down.
  • Run the launch config.

Installing

  • Follow steps in Pre-requisites section.
  • Run npm install vsce
  • Run npm exec vsce package
  • In VS Code, go to Extensions, click on the "..." button in the Extensions bar, select "Install from VSIX" and then select the zener-1.0.0.vsix file that was produced.
  • Build the pcb binary with cargo build --bin=pcb and then do one of:
    • Put it on your $PATH, e.g. cp $CARGO_TARGET_DIR/debug/pcb ~/.cargo/bin/pcb.
    • Configure the setting zener.lspPath for this extension to point to the pcb binary. e.g. $CARGO_TARGET_DIR/debug/pcb.

Updating

Every few months security advisories will arrive about pinned versions of packages.

  • npm audit to see which packages have security updates.
  • npm audit fix to fix those issues.
  • Try npm audit, if it still has issues run npm update.
  • npm exec vsce package to confirm everything still works.