IntelliJ IDEA plugin
Official Piko plugin for JetBrains IDEs, covering .pk and .pkc files. It uses IntelliJ's language-injection system for embedded blocks and LSP4IJ for template intelligence.
Overview
The plugin leans on IntelliJ's native language injection instead of a single language server. Go, CSS, JSON, and JS/TS blocks each get full intelligence from the IDE's own language plugins. Because the IDE drives that intelligence directly, refactoring, find-usages, and inspections work across language boundaries. The plugin also ships dedicated implicit-usage and references-search contributors for Go, CSS, and JS, so a symbol that crosses into a template block is not flagged as unused.
Template-block intelligence (<template>) goes through the LSP4IJ bridge to the pikopls binary, which provides completions, hover, go-to-definition, and diagnostics. Live templates (23 snippets) and Emmet abbreviation expansion cover routine scaffolding. Emmet expands only inside the template body and stays inert in script, style, and i18n blocks, so abbreviation expansion never corrupts Go, CSS, or JSON.
For a marketplace install the plugin bundles a per-platform pikopls binary and extracts it on first use. It tracks a version and size marker, so it re-extracts after a plugin upgrade. Most users do no manual binary setup.
Requirements
- GoLand or IntelliJ IDEA Ultimate 2025.3 or later. The plugin build sets a minimum IDE build of 253, so earlier releases refuse to install.
- The LSP4IJ plugin (v0.19.1 or later) from the JetBrains Marketplace.
- The Go plugin (bundled with GoLand; install separately in IntelliJ Ultimate).
- JDK 21 if building from source (not required for marketplace installs).
Installation
From the JetBrains Marketplace, open Settings -> Plugins, search Piko, install, and restart. From a local build:
cd plugins/idea
./gradlew buildPlugin
Gradle outputs the archive to build/distributions/piko-idea-0.1.0.zip. Install it via Settings -> Plugins -> Install Plugin from Disk.
Configuration
Open Settings -> Languages & Frameworks -> Piko.
| Setting | Description |
|---|---|
| Enable LSP support | Turn template-block intelligence on or off. |
| Enable formatting | Experimental document formatting. It has known issues, so leave it disabled. |
| Enable file logging | Write LSP logs to /tmp/pikopls-<pid>.log. |
| Custom LSP path | Path to pikopls. Empty uses the bundled binary or standard locations. |
| Go binary directory | Directory that holds the go binary. Empty uses auto-detection. |
For a marketplace install the bundled binary covers the Custom LSP path field. Set a custom path only when you run pikopls from source or install it yourself with go install piko.sh/piko/cmd/pikopls@latest.
The Go Configuration group exists because the LSP needs go on PATH. GUI IDEs on macOS do not inherit the shell PATH, so template intelligence can fail silently when the language server cannot find Go. Set the Go binary directory, or keep Detect Go SDK from IDE and Search common installation locations enabled, to let the plugin locate Go for the server.
Transport
By default the plugin starts pikopls in TCP mode on a random loopback port and connects to it. This avoids the stdio pipe-buffer deadlocks that can freeze the IDE. A stdio transport toggle provides an opt-in experimental fallback.
For remote or shared setups, the External Server group connects to an already-running server instead of starting one. Start that server with pikopls --tcp --port=4389, then set the matching host and port. The default host is 127.0.0.1 and the default port is 4389.
Actions
| Action | Location | Description |
|---|---|---|
| Piko File | File -> New | Create a .pk file from a page or partial template. |
| Restart LSP Server | Tools -> Piko | Restart pikopls. |
| Show LSP Output | Tools -> Piko | View LSP server output. |
| Open LSP Logs | Tools -> Piko | Open the LSP log file. |
See also
Sibling integrations:
- VS Code, the VS Code-side equivalent.
- Zed, the Zed-side equivalent.
- AI Agents, built from the same generated type definitions the plugin injects into script blocks.
Framework docs:
- LSP setup, first-time setup and troubleshooting for
pikopls. - PK file format reference, the syntax the plugin colours and validates.