https://github.com/jvolkman/intellij-protobuf-editor
Protocol Buffers for IntelliJ-based IDEs
https://github.com/jvolkman/intellij-protobuf-editor
grpc intellij protobuf protobuf-files protobuf3 protocol-buffers
Last synced: 4 months ago
JSON representation
Protocol Buffers for IntelliJ-based IDEs
- Host: GitHub
- URL: https://github.com/jvolkman/intellij-protobuf-editor
- Owner: jvolkman
- License: apache-2.0
- Archived: true
- Created: 2019-11-23T23:43:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-02T16:03:56.000Z (almost 4 years ago)
- Last Synced: 2024-12-17T09:24:02.950Z (5 months ago)
- Topics: grpc, intellij, protobuf, protobuf-files, protobuf3, protocol-buffers
- Language: Java
- Size: 1.69 MB
- Stars: 122
- Watchers: 7
- Forks: 15
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Note: this plugin has moved to JetBrains
This plugin has been adopted by JetBrains and now lives primarly at https://github.com/JetBrains/intellij-plugins/tree/master/protobuf. Future releases will be bundled with certain versions of JetBrains' tools. As such, this repository likely won't see new updates. Issue tracking and other stuff is still in a bit of a transition phase.# Protocol Buffers support for IntelliJ
[](https://github.com/jvolkman/intellij-protobuf-editor/actions) [](https://gitter.im/intellij-protobuf-editor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
IntelliJ [plugin](https://plugins.jetbrains.com/plugin/14004-protocol-buffer-editor) for editing Google [Protocol Buffers](https://developers.google.com/protocol-buffers). Features include:
* Support for `proto2` and `proto3`
* Syntax highlighting
* Code completion
* Semantic analysis
* References and navigation
* Quick documentation
* Editor enhancements (completion, brace matching, etc.)
* Navigating between protobuf files and some other languages (Java, Go, Python)
* Full support for text format, both standalone and in custom options
This is a fork of [google/intellij-protocol-buffer-editor](https://github.com/google/intellij-protocol-buffer-editor) which was released unsupported.
# Installation
Install from the JetBrains [plugin repository](https://plugins.jetbrains.com/plugin/14004-protocol-buffer-editor), or:
* Download a [release](https://github.com/jvolkman/intellij-protobuf-editor/releases) and install manually
* [Build](#building-and-testing) from source# Building and Testing
This project uses [Bazel](https://bazel.build/).
To build `protobuf-editor.jar`:
```
bazel build //plugin
```To run tests:
```
bazel test //...
```# Path Settings
By default, the collection of project source roots is used as the protobuf search path, and the protobuf descriptor and
well-known type files are provided by the plugin JAR. These paths can be customized in the editor's language settings:
To customize:
* Uncheck `Configure automatically`
* Add paths that include protobuf files
* The `Prefix` column can be used to specify an import prefix for the path. So, for example, if the path is
`src/protos` and the prefix is `foo/bar`, the file at `src/protos/mine.proto` would be imported as
`foo/bar/mine.proto`.
* Organize the paths in the proper resolution order. Files found in paths at the top of the list take precedence.# Text Format
Protobuf Text Format is most commonly used to specify long-form option values in `.proto` files. For example, as seen
in the GRPC ecosystem:
This plugin also supports standalone text format files with a `.textproto` or `.pb`. extension. Text formant by default
does not provide a way to associate a file with its schema (a `message` in a `.proto` file). But the plugin supports
the following comments in a text proto file:```
# proto-file: path/to/file.proto
# proto-message: SomeMessage
# proto-import: path/to/file_with_extensions.proto
# proto-import: path/to/another_file_with_extensions.protofoo: bar
```Filenames are relative to configured roots (see [Settings](#path-settings)). The `proto-message` name is scoped
relatively to the package declared in the `proto-file` file. `proto-message` follows the same resolution rules as type
names in `.proto` files.