Cap'n Proto language support for IntelliJ-based IDEs (IntelliJ IDEA, WebStorm, PyCharm, CLion, etc.)
Cap'n Proto is an insanely fast data interchange format and capability-based RPC system. Think JSON, except binary. Or think Protocol Buffers, except faster.
- Syntax highlighting — keywords, built-in types, identifiers, strings, numbers, constants (
true/false/void), comments, unique IDs (@0x...), and ordinals (@0,@1, ...) - Bracket matching — auto-matching for
{},[],() - Comment toggling — Ctrl+/ to toggle
#line comments - Code folding — collapse struct, enum, and interface blocks
- Cap'n Proto ID generation — generate unique 64-bit schema IDs from Tools menu or Ctrl+Alt+A then G
- New file action — File → New → Capnp File
- Color settings — fully customizable colors via Settings → Editor → Color Scheme → Cap'n Proto
| Token | Examples |
|---|---|
| Keywords | struct, enum, union, interface, const, annotation, using, import, extends |
| Built-in Types | Void, Bool, Int8–Int64, UInt8–UInt64, Float32, Float64, Text, Data, List, AnyPointer, group |
| Constants | true, false, void, inf, nan |
| Unique IDs | @0x85150b117366d14b |
| Ordinals | @0, @1, @42 |
| Strings | "hello world" |
| Numbers | 42, 0xFF, 3.14 |
From Tools menu → Generate capnp id, or Ctrl+Alt+A then G.
The plugin can be built using Gradle:
./gradlew buildPluginThe plugin ZIP can then be found in build/distributions/.
- Build the plugin with
./gradlew buildPlugin - In your JetBrains IDE, go to Settings → Plugins → ⚙️ → Install Plugin from Disk...
- Select the ZIP from
build/distributions/ - Restart the IDE
- IntelliJ Platform 2022.1+ (build 221+)
- All JetBrains IDEs (IntelliJ IDEA, WebStorm, PyCharm, CLion, GoLand, etc.)
BSD 3-Clause. See LICENSE.
See DEVELOPING.md for instructions on developing, testing, running, and publishing the plugin.

