Skip to content

Commit 024aa77

Browse files
committed
Establish JumpProto under the SivanCola repository
The project is being republished under the SivanCola GitHub namespace, so the current working tree is collapsed into a single root commit with repository and issue metadata pointing at the new locations. The extension version is advanced to 1.0.7 because Marketplace already contains 1.0.6 and requires a new version for republishing updated metadata. Constraint: User requested the current project state become the first commit in the new repository Constraint: VS Code Marketplace rejected republishing SivanLiu.jumpproto v1.0.6 because it already exists Rejected: Preserve transferred history | the requested repository state should start from the current project state Rejected: Reuse v1.0.6 for marketplace metadata update | Marketplace version immutability blocks that path Confidence: high Scope-risk: moderate Directive: Keep .omx/ ignored; it is local OMX runtime state and should not be committed Tested: PATH=/Users/Xinwei_1/.nvm/versions/node/v20.19.4/bin:$PATH npm test Tested: PATH=/Users/Xinwei_1/.nvm/versions/node/v20.19.4/bin:$PATH npm run vsix
0 parents  commit 024aa77

17 files changed

Lines changed: 2920 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch: {}
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
cache: npm
22+
23+
- name: Install
24+
run: npm ci
25+
26+
- name: Test
27+
run: npm test
28+
29+
- name: Package VSIX
30+
run: |
31+
mkdir -p dist
32+
npx @vscode/vsce package --out dist/JumpProto.vsix
33+
34+
- name: Upload VSIX
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: JumpProto-vsix
38+
path: dist/JumpProto.vsix

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: npm
21+
22+
- name: Install
23+
run: npm ci
24+
25+
- name: Test
26+
run: npm test
27+
28+
- name: Package VSIX
29+
run: |
30+
mkdir -p dist
31+
npx @vscode/vsce package --out dist/JumpProto.vsix
32+
33+
- name: Publish to VS Code Marketplace
34+
env:
35+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
36+
run: npx @vscode/vsce publish -p "$VSCE_PAT"
37+
38+
- name: Publish to Open VSX
39+
env:
40+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
41+
run: npx ovsx publish dist/JumpProto.vsix -p "$OVSX_PAT"
42+
43+
- name: Create GitHub Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: dist/JumpProto.vsix

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
node_modules/
2+
out/
3+
*.vsix
4+
dist/
5+
.vscode-test/
6+
.DS_Store
7+
.idea/
8+
.history/
9+
.cache/
10+
.tmp/
11+
coverage/
12+
.eslintcache
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
pnpm-debug.log*
17+
*.log
18+
.env
19+
.env.*
20+
.envrc
21+
.direnv/
22+
.trae/
23+
.vscode/
24+
.cursor/
25+
.cursorignore
26+
.claude/
27+
.claudeignore
28+
CLAUDE.md
29+
Thumbs.db
30+
*.swp
31+
*.swo
32+
*.bak
33+
*.orig
34+
*.rej
35+
.AGENTS.md
36+
AGENTS.md
37+
.omx/

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# JumpProto
2+
3+
在 Go 与 `.proto` 之间极速双向跳转,支持定义级与元素级精确定位。
4+
从“看定义”到“改完即编译”,在一个面板里完成。
5+
6+
---
7+
8+
## 中文说明
9+
10+
### 为什么选 JumpProto
11+
12+
- 双向导航:`Go -> .proto``.proto -> Go` 一键互跳
13+
- 精确到元素:支持 `message / enum / service / rpc`,并可定位字段和内部元素
14+
- 操作路径短:`F12``Ctrl/Cmd + Click`、右键菜单、状态栏、侧边栏都可触发
15+
- 兼容现有工程:基于生成文件头部 `// source: path/to/file.proto` 自动回溯源码
16+
- 直接集成编译:支持在侧边栏配置并执行 `make proto` 规则模板
17+
18+
### 典型使用场景
19+
20+
- 在 Go 与 Proto 之间快速来回追踪定义关系
21+
- 排查字段变更、枚举值和 RPC 接口影响范围
22+
- 多目录 proto 仓库中减少全文搜索与手动切换
23+
24+
### 30 秒上手
25+
26+
1. 在 VS Code 安装 `JumpProto`
27+
2. 打开包含 `.pb.go` 的 Go 工程
28+
3. 配置 `protoJump.protoRoots`(推荐)
29+
4. 将光标放在目标符号上并按 `F12`
30+
31+
### 核心功能入口
32+
33+
- `JumpProto: Go to Proto Definition`
34+
- `JumpProto: Go to Go Usage`
35+
- `JumpProto: Compile Current Proto`
36+
- 侧边栏 `?`:打开 Make Proto 规则说明
37+
38+
### 配置项
39+
40+
#### `protoJump.protoRoots`
41+
42+
`.proto` 源文件根目录列表(可多个)。
43+
44+
```json
45+
{
46+
"protoJump.protoRoots": [
47+
"/ABSOLUTE/PATH/TO/your/proto_src",
48+
"$HOME/work/shared-proto"
49+
]
50+
}
51+
```
52+
53+
#### `protoJump.searchInWorkspace`
54+
55+
- 类型:`boolean`
56+
- 默认:`true`
57+
- 说明:当 `protoRoots` 未命中时,是否继续在当前工作区内搜索
58+
59+
#### `protoJump.makeProtoCommand`
60+
61+
- 类型:`string`
62+
- 默认:`""`(空)
63+
- 说明:用于“编译当前 Proto”的命令模板,运行时会按当前 `.proto` 上下文替换占位符
64+
65+
快速流程:
66+
67+
1. 在侧边栏填写规则并保存
68+
2. 点击“测试命令”(dry-run,仅校验模板与 shell 语法)
69+
3. 点击“编译当前 Proto”执行真实命令
70+
71+
示例模板:
72+
73+
```bash
74+
cd {protoSrcRoot} && make special_proto packagename={protoPackage} filename={protoFileNoExt}
75+
```
76+
77+
可用占位符:
78+
79+
- `{workspaceFolder}`
80+
- `{protoSrcRoot}`
81+
- `{protoFile}`
82+
- `{protoFileNoExt}`
83+
- `{protoDir}`
84+
- `{relativeProto}`
85+
- `{relativeProtoNoExt}`
86+
- `{protoPackage}`
87+
88+
#### `protoJump.uiLanguage`
89+
90+
- 类型:`"zh" | "en"`
91+
- 默认:`"en"`
92+
- 说明:控制侧边栏与提示消息语言
93+
94+
### 前置条件
95+
96+
- 项目使用 `protoc-gen-go` 生成 `.pb.go`
97+
- 生成文件头部包含:
98+
99+
```go
100+
// source: path/to/file.proto
101+
```
102+
103+
### 常见问题
104+
105+
#### 为什么会出现多个定义候选?
106+
107+
启用 `gopls` 时,VS Code 可能同时给出 `.pb.go``.proto` 候选。选择 `.proto` 即可。
108+
109+
#### 找不到目标 proto 文件怎么办?
110+
111+
- 检查 `protoJump.protoRoots` 是否正确
112+
- 检查 `.pb.go``// source:` 路径是否与仓库结构一致
113+
- 检查 `protoJump.searchInWorkspace` 是否被关闭
114+
115+
---
116+
117+
## English
118+
119+
JumpProto gives you fast, precise, bi-directional navigation between Go and `.proto`, plus an integrated proto compile flow.
120+
121+
### Why JumpProto
122+
123+
- Bi-directional jumps: `Go -> .proto` and `.proto -> Go`
124+
- Element-level precision for `message / enum / service / rpc`, fields, and nested symbols
125+
- Multiple entry points: `F12`, `Ctrl/Cmd + Click`, context menu, status bar, sidebar
126+
- Works with generated Go files via `// source: path/to/file.proto`
127+
- Built-in compile workflow from sidebar using a command template
128+
129+
### Quick Start
130+
131+
1. Install `JumpProto` from VS Code Marketplace
132+
2. Open a Go project with generated `.pb.go` files
133+
3. Configure `protoJump.protoRoots` (recommended)
134+
4. Put cursor on a symbol and press `F12`
135+
136+
### Main Commands
137+
138+
- `JumpProto: Go to Proto Definition`
139+
- `JumpProto: Go to Go Usage`
140+
- `JumpProto: Compile Current Proto`
141+
- Sidebar `?`: open Make Proto rule guide
142+
143+
### Settings
144+
145+
#### `protoJump.protoRoots`
146+
147+
List of source `.proto` roots.
148+
149+
```json
150+
{
151+
"protoJump.protoRoots": [
152+
"/ABSOLUTE/PATH/TO/your/proto_src",
153+
"$HOME/work/shared-proto"
154+
]
155+
}
156+
```
157+
158+
#### `protoJump.searchInWorkspace`
159+
160+
- Type: `boolean`
161+
- Default: `true`
162+
- Description: continue searching in workspace when `protoRoots` has no match
163+
164+
#### `protoJump.makeProtoCommand`
165+
166+
- Type: `string`
167+
- Default: `""`
168+
- Description: shell template for `Compile Current Proto`; placeholders are resolved from active `.proto` context
169+
170+
Example:
171+
172+
```bash
173+
cd {protoSrcRoot} && make special_proto packagename={protoPackage} filename={protoFileNoExt}
174+
```
175+
176+
Supported placeholders:
177+
178+
- `{workspaceFolder}`
179+
- `{protoSrcRoot}`
180+
- `{protoFile}`
181+
- `{protoFileNoExt}`
182+
- `{protoDir}`
183+
- `{relativeProto}`
184+
- `{relativeProtoNoExt}`
185+
- `{protoPackage}`
186+
187+
#### `protoJump.uiLanguage`
188+
189+
- Type: `"zh" | "en"`
190+
- Default: `"en"`
191+
- Description: language for sidebar and notifications
192+
193+
### Requirements
194+
195+
- `.pb.go` is generated by `protoc-gen-go`
196+
- Generated file header includes:
197+
198+
```go
199+
// source: path/to/file.proto
200+
```
201+
202+
---
203+
204+
## 隐私说明 / Privacy
205+
206+
文档示例统一使用占位路径(如 `/ABSOLUTE/PATH/TO/...``$HOME/...`),避免暴露个人目录信息。
207+
All path examples use placeholders to avoid exposing personal local directory information.
208+
209+
## Bug 反馈 / Bug Reports
210+
211+
- 提交地址 / Report here: <https://github.com/SivanCola/issues/issues>

0 commit comments

Comments
 (0)