P4 Packet Programming Toolkit for VS CodeP4_16 navigation and typed completion, with a bundled analyzer for macOS ARM64. This is not full Java IDE parity. Go to Implementation currently returns source declarations; it does not discover separate implementations. This project packages the Rust P4 analyzer as a VS Code extension. Install one
VSIX, open a The current release provides P4 syntax support, diagnostics from the analyzer,
completion, hover, and definition navigation across the opened file and its
recursive Keyboard commandsUse F12 for definition navigation, Shift+F12 for references, and Ctrl+Space for completion. If macOS intercepts Ctrl+Space, use Cmd+Shift+P → Trigger Suggest or assign your preferred shortcut in VS Code Keyboard Shortcuts. No system shortcut settings are changed by this extension. Local developmentNode.js and npm are required. From this directory run npm install and npm run compile. During development the extension automatically falls back to:
Production installations never use that sibling checkout fallback. In Restricted Mode, executable overrides are ignored and only the bundled analyzer is used. Virtual/web-only workspaces are unsupported. The extension itself sends no telemetry; VS Code and other installed extensions have independent policies.
Run check:fast before opening VS Code. Its preflight stops immediately when the analyzer, include path, or executable permissions are wrong; then it checks TypeScript, the extension bundle, and one real LSP definition request:
The slower test:vscode command first checks the bundle and VS Code executable,
then launches a clean Extension Development Host. Set The checks are intentionally layered so failures are local and actionable:
preflight paths and process startup, TypeScript, bundling, one LSP request,
and only then the slower VS Code host. Definition navigation covers functions, actions, types, fields, methods, tables, parser states, recursive includes, overload candidates, P4 builtin documentation, UTF-16 positions, and unsaved buffers. Find References follows resolved source identities; project-wide library consumers require explicitly configured programs. Safe rename remains unsupported. Build-aware libraries (0.5.0 local build)Use Semantic editing (0.4.0 local build)Type Parameter hints show declared overloads and the active parameter; Hover shows resolved declarations; Outline shows nested types, fields, controls/actions and tables. Go to Type Definition now follows a value's type. These features use unsaved buffers and recursive includes. Parameter-help builtins, named-argument mapping, comprehensive semantic documentation and full P4 grammar coverage are not complete. Safe rename, formatting and quick fixes remain unfinished. The 0.5.1 candidate targets macOS ARM64 only. Linux ARM64 remote-host qualification is pending; Windows, x64, ARM32 and Alpine/musl are not supported by this package. Older mixed local development packages are not release assets. Dependency attributions are supplied in THIRD_PARTY_NOTICES.md. |