Environment:
GoLand 2021.1
Build #GO-211.6693.119, built on April 6, 2021
Runtime version: 11.0.10+9-b1341.35 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1966M
Cores: 32
Registry: ide.completion.variant.limit=500, documentation.show.toolbar=true, debugger.watches.in.variables=false, suggest.all.run.configurations.from.context=true, ide.balloon.shadow.size=0, go.run.processes.with.pty=false, eslint.additional.file.extensions=svelte
Non-Bundled Plugins: Rider UI Theme Pack (0.8), coderpillr.theme (1.0.0-rc.3), com.alicannklc.tailwind (1.4.6), com.bum.intellij.tailwindcss (1.1.4), com.github.ushiosan23.darktheme (1.0.2), com.intellij.ideolog (203.0.27.0), com.intellij.plugins.vscodekeymap (211.4961.30), com.jetbrains.darkPurpleTheme (1.2), org.jetbrains.plugins.less (211.6693.76), com.mfwebstudio.atomonedark.plugin.id (1.0.3), com.vecheslav.darculaDarkerTheme (1.2.0), com.xinkun.theme.md (1.7.12), github.cweijan.test-theme (1.6), io.kanro.idea.plugin.protobuf (0.0.3), net.antelle.intellij-xcode-dark-theme (1.2.2), PythonCore (211.6693.119)
As an example, create 2 files:
util.proto
:
syntax = "proto3";
package test;
option go_package = "test/grpc/pb";
message Sort {
string field = 1;
int64 order = 2; // 1 standing for asc, -1 for desc
}
message OffsetLimit {
int64 offset = 1;
int64 limit = 2;
}
and another one that uses it:
test.proto
:
syntax = "proto3";
package test;
import "google/protobuf/timestamp.proto";
import "util.proto";
option go_package = "test/grpc/pb";
service Updater {
rpc Update (UpdateRequest) returns (UpdateRequestReply);
}
message UpdateRequest {
repeated Sort order_field = 1;
}
message UpdateRequestReply {
string error = 1;
google.protobuf.Timestamp last_updated = 2;
}
Monitor that the editor has no idea what Sort is coming from.
Regarding google.protobuf.Timestamp
, as it is a global to proto, I have no idea how the plugin is supposed to find location of definitions.
enhancement good first issue