Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ jobs:
- target: alpine-x64
image: ghcr.io/blackdex/rust-musl:x86_64-musl-nightly
rust-target: x86_64-unknown-linux-musl
- target: alpine-arm64
image: ghcr.io/blackdex/rust-musl:aarch64-musl-nightly
rust-target: aarch64-unknown-linux-musl
steps:
- name: Install build dependencies
run: |
Expand Down Expand Up @@ -647,7 +644,6 @@ jobs:
- win32-x64
- darwin-arm64
- alpine-x64
- alpine-arm64
- web
steps:
- name: Download VSIX artifacts
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vide"
version = "1.1.0"
version = "1.2.0"
edition = "2024"
authors = ["roifewu <roifewu@gmail.com>", "hongjr03 <hongjr03@gmail.com>"]
repository = "https://github.com/pascal-lab/vide"
Expand Down
2 changes: 1 addition & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default defineConfig({
{
label: 'Changelog',
translations: { en: 'Changelog' },
items: ['changelog', 'changelog/v1-1-0'],
items: ['changelog', 'changelog/v1-2-0', 'changelog/v1-1-0'],
},
{
label: 'Playground',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ npm run package:vsix -- --target linux-arm64
npm run package:vsix -- --target win32-x64
npm run package:vsix -- --target darwin-arm64
npm run package:vsix -- --target alpine-x64
npm run package:vsix -- --target alpine-arm64
```

这些脚本会先编译扩展,然后准备目标平台的 release 版语言服务器,再生成 `vide-vscode-<target>.vsix`。release 包默认不启用 profile trace,也不包含 Speedscope 静态资源或 profiling 命令。当前 release workflow 只覆盖上面这些目标:glibc Linux、Windows x64、macOS arm64,以及 Alpine/musl x64 和 arm64
这些脚本会先编译扩展,然后准备目标平台的 release 版语言服务器,再生成 `vide-vscode-<target>.vsix`。release 包默认不启用 profile trace,也不包含 Speedscope 静态资源或 profiling 命令。当前 release workflow 只覆盖上面这些目标:glibc Linux、Windows x64、macOS arm64,以及 Alpine/musl x64。
这几项也是当前 CI 会实际构建的 VSIX 目标。其他平台不是当前支持的打包目标。

上面的打包命令都需要先准备目标平台的语言服务器二进制;`editors/vscode/scripts/package.ts` 会调用 `cargo xtask vscode prepare-server`,而通用的 server 构建规则由 `cargo xtask server build` 承载:
Expand Down Expand Up @@ -158,7 +157,6 @@ code --install-extension ./vide-vscode-win32-x64-debug.vsix

VSIX 是按平台打包的。当前正式发布和 CI 产物覆盖这些目标:

- `alpine-arm64`
- `alpine-x64`
- `darwin-arm64`
- `linux-arm64`
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/src/content/docs/changelog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components';
按版本查看 Vide 的发布变化。

<CardGrid>
<LinkCard
title="1.2.0"
href="./v1-2-0/"
description="宏和 include 来源模型、宏展开悬停、更多自动重构、struct 符号大纲、Qihe 选项生成,以及发布包流程优化。"
/>
<LinkCard
title="1.1.0"
href="./v1-1-0/"
Expand Down
61 changes: 61 additions & 0 deletions docs/src/content/docs/changelog/v1-2-0/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: 1.2.0
description: Vide 1.2.0 更新日志。
---

Vide 1.2.0 主要改善宏相关的跳转、悬停、引用搜索和代码动作,同时补齐 Qihe 选项生成和发布包流程。

## 重点更新

### 宏阅读和条件编译

- 阅读宏调用时,现在可以直接在悬停信息里看到宏签名、实参对应关系、最终展开结果,以及嵌套宏每一步是怎么展开的。([#237](https://github.com/pascal-lab/vide/pull/237) by [@hongjr03](https://github.com/hongjr03))

![宏悬停和宏实备注解示例](../../assets/changelog/1.2.0/macro-hover-inlay.gif)

- 宏不再只局限于当前文件:定义在 include 头文件里的宏,可以参与跳转定义、引用搜索、悬停、补全和诊断定位。([#228](https://github.com/pascal-lab/vide/pull/228) by [@hongjr03](https://github.com/hongjr03), [#235](https://github.com/pascal-lab/vide/pull/235) by [@hongjr03](https://github.com/hongjr03))
- `vide.toml` 里配置的预定义宏,在能定位到配置项时,也可以作为跳转和引用目标。([#238](https://github.com/pascal-lab/vide/pull/238) by [@hongjr03](https://github.com/hongjr03))
- 对同一段 `ifdef` / `ifndef` 条件编译代码,诊断、导航、语义高亮、当前位置高亮和引用搜索现在会采用更一致的分支判断。([#234](https://github.com/pascal-lab/vide/pull/234) by [@hongjr03](https://github.com/hongjr03), [#241](https://github.com/pascal-lab/vide/pull/241) by [@hongjr03](https://github.com/hongjr03))

### 自动重构和符号大纲

- 新增更多 Code Actions:`always` / `always_comb` / `always_ff` 转换、ANSI / non-ANSI 端口声明转换、命名端口简写展开/折叠、去除多余括号、合并嵌套 `if`、提取变量、条件赋值上拉/下拉、数字字面量重排等。([#239](https://github.com/pascal-lab/vide/pull/239) by [@roife](https://github.com/roife))

![转换 always 块示例](../../assets/changelog/1.2.0/conv-to-always-comb.gif)

![ANSI 和 non-ANSI 端口声明转换示例](../../assets/changelog/1.2.0/ansi-non-ansi.gif)

![命名端口简写展开和折叠示例](../../assets/changelog/1.2.0/named-port-shorthand-expansion-collapse.gif)

![提取变量示例](../../assets/changelog/1.2.0/extract-var.gif)

- 符号大纲现在会显示 `typedef struct` / `typedef union`,包括嵌套 generate 或 block 作用域里的结构类型。([#239](https://github.com/pascal-lab/vide/pull/239) by [@roife](https://github.com/roife))

![struct 符号大纲示例](../../assets/changelog/1.2.0/struct-outline.png)

### Qihe 集成

- VS Code 扩展现在可以检测 `qihe-options.toml`,并在运行 Qihe 时自动加入 `--options ./qihe-options.toml`;配置文件里的 `storage.root` 会被保留。([#226](https://github.com/pascal-lab/vide/pull/226) by [@edragain2nd](https://github.com/edragain2nd))
- 新增从 VS Code 生成 `qihe-options.toml` 的命令,复用当前 Qihe 命令设置,并补充中英文文档说明。([#230](https://github.com/pascal-lab/vide/pull/230) by [@hongjr03](https://github.com/hongjr03))

### 稳定性、CI 和发布包

- 修复文件改名或新增文件后,部分工作区请求可能崩溃的问题。([#229](https://github.com/pascal-lab/vide/pull/229) by [@hongjr03](https://github.com/hongjr03))
- 修复 Alpine 发布包里的 C++ / musl 链接问题。([#232](https://github.com/pascal-lab/vide/pull/232) by [@hongjr03](https://github.com/hongjr03))
- VS Code Web Smoke 测试依赖拆到独立包,避免普通扩展安装和发布包流程触发浏览器下载脚本。([#231](https://github.com/pascal-lab/vide/pull/231) by [@hongjr03](https://github.com/hongjr03))
- VS Code 扩展打包流程经过整理,发布包体积更小;性能分析相关内容只保留在调试包和性能分析包里。([#240](https://github.com/pascal-lab/vide/pull/240) by [@roife](https://github.com/roife))
- 预处理器相关代码被整理到独立模块,后续维护和扩展更清晰。([#227](https://github.com/pascal-lab/vide/pull/227) by [@hongjr03](https://github.com/hongjr03))

## 贡献者

感谢本次发布的所有贡献者:

- [@edragain2nd](https://github.com/edragain2nd)
- [@hongjr03](https://github.com/hongjr03)
- [@roife](https://github.com/roife)

## 新贡献者

- [@edragain2nd](https://github.com/edragain2nd) 在 [#226](https://github.com/pascal-lab/vide/pull/226) 中完成了首次贡献。

**完整更新列表**: [v1.1.0...v1.2.0](https://github.com/pascal-lab/vide/compare/v1.1.0...v1.2.0)
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ npm run package:vsix -- --target linux-arm64
npm run package:vsix -- --target win32-x64
npm run package:vsix -- --target darwin-arm64
npm run package:vsix -- --target alpine-x64
npm run package:vsix -- --target alpine-arm64
```

These scripts compile the extension, prepare a release server binary for the target platform, and generate `vide-vscode-<target>.vsix`. Release packages do not enable profile trace, and they do not include Speedscope static assets or the profiling command by default. The current release workflow only covers those targets: glibc Linux, Windows x64, macOS arm64, and Alpine/musl x64 and arm64.
These scripts compile the extension, prepare a release server binary for the target platform, and generate `vide-vscode-<target>.vsix`. Release packages do not enable profile trace, and they do not include Speedscope static assets or the profiling command by default. The current release workflow only covers those targets: glibc Linux, Windows x64, macOS arm64, and Alpine/musl x64.
Those are also the VSIX targets currently built by CI. Other platforms are not current packaging targets.

All packaging commands above need to prepare the language server binary for the target platform first. `editors/vscode/scripts/package.ts` calls `cargo xtask vscode prepare-server`, and the reusable server build rules live under `cargo xtask server build`:
Expand Down Expand Up @@ -172,7 +171,6 @@ You can download a `.vsix` file and install it manually. Choose the source based

VSIX packages are platform-specific. Current release and CI artifacts cover these targets:

- `alpine-arm64`
- `alpine-x64`
- `darwin-arm64`
- `linux-arm64`
Expand Down
5 changes: 5 additions & 0 deletions docs/src/content/docs/en/changelog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { CardGrid, LinkCard } from '@astrojs/starlight/components';
Browse Vide changes by version.

<CardGrid>
<LinkCard
title="1.2.0"
href="./v1-2-0/"
description="Macro and include provenance, macro expansion hover, more automatic refactoring, struct document symbols, Qihe options generation, and release packaging updates."
/>
<LinkCard
title="1.1.0"
href="./v1-1-0/"
Expand Down
61 changes: 61 additions & 0 deletions docs/src/content/docs/en/changelog/v1-2-0/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: 1.2.0
description: Vide 1.2.0 release notes.
---

Vide 1.2.0 improves macro navigation, hover, references, and code actions, while adding Qihe options generation and release packaging updates.

## Highlights

### Reading Macros and Conditional Code

- When reading a macro call, hover can now show the macro signature, argument mapping, final expansion text, and each nested expansion step. ([#237](https://github.com/pascal-lab/vide/pull/237) by [@hongjr03](https://github.com/hongjr03))

![Macro hover and macro-argument inlay hints example](../../../assets/changelog/1.2.0/macro-hover-inlay.gif)

- Macros are no longer limited to the current file: macros defined in included headers can participate in go to definition, find references, hover, completion, and diagnostic targeting. ([#228](https://github.com/pascal-lab/vide/pull/228) by [@hongjr03](https://github.com/hongjr03), [#235](https://github.com/pascal-lab/vide/pull/235) by [@hongjr03](https://github.com/hongjr03))
- Predefined macros from `vide.toml` can be navigation and reference targets when Vide can locate the matching configuration entry. ([#238](https://github.com/pascal-lab/vide/pull/238) by [@hongjr03](https://github.com/hongjr03))
- For the same `ifdef` / `ifndef` code, diagnostics, navigation, semantic tokens, document highlights, and references now agree more consistently on the active branch. ([#234](https://github.com/pascal-lab/vide/pull/234) by [@hongjr03](https://github.com/hongjr03), [#241](https://github.com/pascal-lab/vide/pull/241) by [@hongjr03](https://github.com/hongjr03))

### Code Actions and Document Symbols

- More Code Actions are available: `always` / `always_comb` / `always_ff` conversion, ANSI / non-ANSI port declaration conversion, named-port shorthand expansion/collapse, redundant-parentheses removal, nested-`if` merge, variable extraction, assignment pull up/down, number-literal reformatting, and more. ([#239](https://github.com/pascal-lab/vide/pull/239) by [@roife](https://github.com/roife))

![Always block conversion example](../../../assets/changelog/1.2.0/conv-to-always-comb.gif)

![ANSI and non-ANSI port declaration conversion example](../../../assets/changelog/1.2.0/ansi-non-ansi.gif)

![Named port shorthand expansion and collapse example](../../../assets/changelog/1.2.0/named-port-shorthand-expansion-collapse.gif)

![Extract variable example](../../../assets/changelog/1.2.0/extract-var.gif)

- Document symbols now include `typedef struct` / `typedef union`, including types nested inside generate or block scopes. ([#239](https://github.com/pascal-lab/vide/pull/239) by [@roife](https://github.com/roife))

![Struct document symbols example](../../../assets/changelog/1.2.0/struct-outline.png)

### Qihe Integration

- The VS Code extension can detect `qihe-options.toml` and automatically add `--options ./qihe-options.toml` when running Qihe. `storage.root` from the options file is preserved. ([#226](https://github.com/pascal-lab/vide/pull/226) by [@edragain2nd](https://github.com/edragain2nd))
- A new VS Code command can generate `qihe-options.toml`, reusing the current Qihe command setting, with English and Chinese docs for the workflow. ([#230](https://github.com/pascal-lab/vide/pull/230) by [@hongjr03](https://github.com/hongjr03))

### Reliability, CI, and Packages

- Fixed a crash that could happen in some workspace requests after files were renamed or added. ([#229](https://github.com/pascal-lab/vide/pull/229) by [@hongjr03](https://github.com/hongjr03))
- Fixed C++ / musl linking issues in Alpine packages. ([#232](https://github.com/pascal-lab/vide/pull/232) by [@hongjr03](https://github.com/hongjr03))
- VS Code Web Smoke dependencies moved into a separate package, so regular extension installs and package jobs no longer trigger browser download scripts. ([#231](https://github.com/pascal-lab/vide/pull/231) by [@hongjr03](https://github.com/hongjr03))
- VS Code extension packaging was reorganized, making release packages smaller. Profiling support stays available in debug/profile packages. ([#240](https://github.com/pascal-lab/vide/pull/240) by [@roife](https://github.com/roife))
- Preprocessor code was reorganized into a clearer module boundary for future maintenance. ([#227](https://github.com/pascal-lab/vide/pull/227) by [@hongjr03](https://github.com/hongjr03))

## Contributors

Thanks to everyone who contributed to this release:

- [@edragain2nd](https://github.com/edragain2nd)
- [@hongjr03](https://github.com/hongjr03)
- [@roife](https://github.com/roife)

## New Contributors

- [@edragain2nd](https://github.com/edragain2nd) made their first contribution in [#226](https://github.com/pascal-lab/vide/pull/226).

**Full Changelog**: [v1.1.0...v1.2.0](https://github.com/pascal-lab/vide/compare/v1.1.0...v1.2.0)
1 change: 0 additions & 1 deletion docs/src/content/docs/en/user-guide/emacs-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Choose the language server binary for your platform:
| Windows x64 | [`vide-win32-x64.exe`](https://github.com/pascal-lab/vide/releases/latest/download/vide-win32-x64.exe) |
| macOS arm64 | [`vide-darwin-arm64`](https://github.com/pascal-lab/vide/releases/latest/download/vide-darwin-arm64) |
| Alpine/musl x64 | [`vide-alpine-x64`](https://github.com/pascal-lab/vide/releases/latest/download/vide-alpine-x64) |
| Alpine/musl arm64 | [`vide-alpine-arm64`](https://github.com/pascal-lab/vide/releases/latest/download/vide-alpine-arm64) |

Linux x64 example:

Expand Down
15 changes: 9 additions & 6 deletions docs/src/content/docs/en/user-guide/features/annotations.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Annotations
description: Show port, parameter, structure-name, and instance-count annotations near the relevant code.
description: Show port, parameter, macro-argument, structure-name, and instance-count annotations near the relevant code.
---

import FeatureExample from '../../../../../components/FeatureExample.astro';
Expand All @@ -12,11 +12,12 @@ import { inlayHintFiles } from '../../../../../examples/dailyUse';

Annotations show auxiliary information directly next to the relevant code, so you can see the target of a connection, parameter, or structure without jumping away.

There are currently three main kinds of annotations:
There are currently four main kinds of annotations:

1. Instance connection annotations: show target port names and direction arrows next to port connections. `input` shows `←`, `output` shows `→`, `inout` shows `↔`, and `ref` shows `&`. If the port name is already written in code, Vide only shows the direction arrow to avoid repetition.
2. Parameter and structure annotations: show target parameter names next to ordered parameter assignments, and structure names near endings such as `endmodule`.
3. Instance-count annotations: show how many times the current module is instantiated above the module declaration.
2. Parameter and macro-argument annotations: show target parameter names next to ordered parameter assignments, and macro parameter names next to macro call arguments.
3. Structure annotations: show structure names near endings such as `endmodule`.
4. Instance-count annotations: show how many times the current module is instantiated above the module declaration.

## Demo

Expand All @@ -43,11 +44,11 @@ There are currently three main kinds of annotations:

### Without Complete Configuration

Annotations for ports, parameters, and structure endings that can be resolved in the current file are available. Cross-file instance connections and instance-count statistics depend on files scanned by Vide and can be incomplete.
Annotations for ports, parameters, macro arguments, and structure endings that can be resolved in the current file are available. Cross-file instance connections, macros reached through include chains, and instance-count statistics depend on files scanned by Vide and can be incomplete.

### With Complete Configuration

After `vide.toml` is configured, annotations resolve modules, include files, and macro branches from the project scope. Cross-file ports, parameters, and instance-count statistics become more complete.
After `vide.toml` is configured, annotations resolve modules, include files, and macro branches from the project scope. Cross-file ports, parameters, macro arguments, and instance-count statistics become more complete.

## Settings

Expand All @@ -57,13 +58,15 @@ Search for `Vide Inlay Hints` or `Vide Lens` in VS Code Settings, or configure t
{
"vide.inlayHints.port.connection.enable": true,
"vide.inlayHints.parameter.assignment.enable": true,
"vide.inlayHints.macro.argument.enable": true,
"vide.inlayHints.end.structure.enable": true,
"vide.lens.instantiations.enable": true
}
```

- `vide.inlayHints.port.connection.enable`: shows or hides port names and direction arrows next to instance port connections.
- `vide.inlayHints.parameter.assignment.enable`: shows or hides parameter names next to ordered parameter assignments.
- `vide.inlayHints.macro.argument.enable`: shows or hides macro parameter names next to macro call arguments.
- `vide.inlayHints.end.structure.enable`: shows or hides structure names near endings such as `endmodule`.
- `vide.lens.instantiations.enable`: shows or hides instance-count annotations above module declarations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Codicon from '../../../../../components/Codicon.astro';

## What It Is

Document symbols organize modules, ports, parameters, declarations, functions, tasks, generate blocks, and regions in the current file into a hierarchy. They appear in VS Code's <Codicon name="list-tree" label="Outline icon" /> Outline panel, breadcrumbs <Codicon name="chevron-right" label="Breadcrumb level icon" />, and <Codicon name="symbol-misc" label="Symbol icon" /> `Go to Symbol in Editor`.
Document symbols organize modules, ports, parameters, declarations, `struct` / `union` types, functions, tasks, generate blocks, and regions in the current file into a hierarchy. They appear in VS Code's <Codicon name="list-tree" label="Outline icon" /> Outline panel, breadcrumbs <Codicon name="chevron-right" label="Breadcrumb level icon" />, and <Codicon name="symbol-misc" label="Symbol icon" /> `Go to Symbol in Editor`.

## Demo

Expand Down
Loading
Loading