vscode-proto3
vscode-proto3 copied to clipboard
Can not jump into protobuf include proto file
Can not jump into protobuf builtin proto file, Like:
import "google/protobuf/empty.proto";
Press F12
not working: No definition found for 'empty.proto'
Setting.json:
{
"protoc": {
"options": [
"--proto_path=${workspaceRoot}/third_party",
"--proto_path=D:\\protoc\\include",
],
}
}
Hi, did you ever find a solution to this? I am having the same issue.
@elricli @lutherjohnrichards I'm also facing the same issue, did you fixed it for yourselves?
The best thing that worked for me was ln -s
For those who is struggling with the same issue, I've found a workaround.
This extension checks only current vscode workspace for imports, so you can link your protobuf include directory (for me it is /opt/homebrew/Cellar/protobuf/23.4/include
) to your workspace and it will resolve your imports.
My example: I have a gitignored vendor/
directory, so I ran ln -s /opt/homebrew/Cellar/protobuf/23.4/include/google vendor/google
, and my imports are resolved.
This is a good place to improve the extension though, maybe I will add support of external directories once I have more spare time