diff --git a/CHANGELOG.md b/CHANGELOG.md index 13e21e9..9bb2352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,67 @@ All notable changes to lucisv are recorded here. Versions follow [semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes (see `README.md`) are the only frozen contract. +## 0.13.0 — 2026-08-28 + +Editor responsiveness, and hover for old-style ports. + +### Typing costs one reanalysis, not one per keystroke + +`didChange` no longer reparses and re-lints the buffer on every +keystroke. The text the server holds is still exactly current after +every notification; only the analysis is deferred, and it runs at the +first moment anything needs it — the next request, the next +non-`didChange` notification, or a 150 ms quiet period. A burst of ten +keystrokes in a 10 000-line file therefore costs one 31 ms reanalysis +instead of ten. The visible consequence: intermediate diagnostics +states are no longer published, so squiggles for a half-typed line that +was finished a moment later never appear. Every state that is published +is one the buffer really passed through. Closing a file that was +mid-edit discards its pending change instead of analyzing it, so it +costs one publish — the one that clears its squiggles — and not two. + +The one case this makes slower is a single keystroke followed by +nothing at all: it now waits out the quiet period before publishing, +164 ms instead of one reanalysis. Editors ask for something after every +change — semantic tokens, inlay hints, highlights — and any request +flushes the buffer before it is answered, so the latency a user +actually meets is 4.4 ms in a 1 000-line file and 37.6 ms in a +10 000-line one. + +### Hover shows a non-ANSI port's real declaration + +A port declared the old way — named in the module header, completed in +the body by `input signed [31:0] data_in;` — now hovers as two fenced +sections: the header line, then the body declaration that carries the +direction, the type and the width. Go-to-definition offers both, the +body declaration first. It works cross-file, into files that are not +open, because the span travels through the workspace index. An +old-style task or function argument (`task t(a);` finished by +`input [7:0] a;`) reads the same way. Each section also carries every +comment that documents it: the lines above it, the comment beside it, +and the lines below it when nothing else could claim them — all three +at once where all three are written. + +### Faster hover and navigation + +A hover into a closed file reads that file once instead of twice (34 ms +→ 16.3 ms on a 31.7 MB file), and resolving a live declaration looks +its name up instead of walking every symbol in the buffer. Measurements +and how to reproduce them: `docs/perf/README.md`. + +### Cursor-position answers stop walking the whole buffer + +Expand-selection, on-type formatting, the completion scope gates and +the inline template trigger each used to scan every token in the file +to find the one at the cursor. They now binary-search for it: 77 µs → +20 ns in a 10 000-line buffer, and 130 µs → 36 ns for the widest of +them. No answer changed — each swap is pinned by a test that compares +it against the scan it replaced at every byte of the buffer. + +The persistent index cache's record format changed to carry the new +span, so the first session after upgrading rebuilds its index rather +than reading the old store. + ## 0.12.1 — 2026-08-27 Hover shows the cross-file declaration itself. A name declared in diff --git a/Cargo.lock b/Cargo.lock index 4044619..929a261 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ [[package]] name = "lucisv" -version = "0.12.1" +version = "0.13.0" dependencies = [ "lucisv_core", "rayon", @@ -108,11 +108,11 @@ dependencies = [ [[package]] name = "lucisv_core" -version = "0.12.1" +version = "0.13.0" [[package]] name = "lucisv_server" -version = "0.12.1" +version = "0.13.0" dependencies = [ "lsp-server", "lsp-types", @@ -248,14 +248,14 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vlog_formatter" -version = "0.12.1" +version = "0.13.0" dependencies = [ "vlog_parser", ] [[package]] name = "vlog_linter" -version = "0.12.1" +version = "0.13.0" dependencies = [ "vlog_formatter", "vlog_parser", @@ -264,11 +264,11 @@ dependencies = [ [[package]] name = "vlog_parser" -version = "0.12.1" +version = "0.13.0" [[package]] name = "vlog_refactor" -version = "0.12.1" +version = "0.13.0" dependencies = [ "vlog_parser", "vlog_semantic", @@ -276,7 +276,7 @@ dependencies = [ [[package]] name = "vlog_semantic" -version = "0.12.1" +version = "0.13.0" dependencies = [ "vlog_parser", ] diff --git a/Cargo.toml b/Cargo.toml index 15a7ae9..776b158 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.12.1" +version = "0.13.0" authors = ["Guoliang Chen"] edition = "2021" license = "MIT" diff --git a/editors/vscode/CHANGELOG.md b/editors/vscode/CHANGELOG.md index d23bfa8..3e95abc 100644 --- a/editors/vscode/CHANGELOG.md +++ b/editors/vscode/CHANGELOG.md @@ -5,6 +5,26 @@ for you. The extension and its bundled language server share one version number; the full engineering notes live in the [project changelog](https://git.luci.ooo/lucio/lucisv/src/branch/master/CHANGELOG.md). +## 0.13.0 — 2026-08-28 + +- **Typing no longer reanalyzes on every keystroke.** The buffer's analysis is + deferred to the first moment anything needs it, so a burst of typing costs + one reanalysis instead of one per key. Half-typed lines stop flashing + squiggles that vanish a keystroke later. In a 10 000-line file a keystroke + now round-trips in 37.6 ms. +- **Old-style ports hover properly.** A port named in the module header and + completed in the body (`input signed [31:0] data_in;`) now shows both + places on one card — the header line and the declaration carrying its + direction, type and width — with the comments that document each of them. + Go-to-definition offers both, body declaration first. Works across files, + and for old-style task and function arguments too. +- **Faster hover and cursor answers.** Hovering into a closed file reads it + once instead of twice, and expand-selection, on-type formatting, completion + and inline templates find the token at your cursor by binary search rather + than by scanning the file. No answer changed. +- The index cache's format changed, so the first session after upgrading + rebuilds it. + ## 0.12.1 — 2026-08-27 - **Hover shows the declaration itself.** Hovering a name declared in another diff --git a/editors/vscode/README.md b/editors/vscode/README.md index 2bb596d..c9d6f9a 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -30,7 +30,7 @@ Install **lucisv — Verilog/SystemVerilog** from the VS Code Extensions view, then open a Verilog or SystemVerilog file. There is no separate server or CLI setup. -The current release is **0.12.1**. Its platform packages include both +The current release is **0.13.0**. Its platform packages include both `lucisv-server` and the `lucisv` command-line tool: | Package target | Machines | @@ -320,6 +320,20 @@ Every nesting color is a proper VS Code theme color: } ``` +## Release 0.13.0 highlights + +Version 0.13.0 is the responsiveness release. Typing no longer reanalyzes the +buffer on every keystroke — the analysis is deferred to the first moment +anything needs it, so a burst of typing costs one reanalysis instead of one +per key, and half-typed lines stop flashing squiggles that vanish a moment +later. Cursor-position answers — expand selection, on-type formatting, +completion, inline templates — binary-search for the token under your cursor +instead of scanning the file. + +Hover also learned old-style ports: a port named in the module header and +completed in the body (`input signed [31:0] data_in;`) shows both places on +one card, with the comments that document each of them. + ## Release 0.12.1 highlights Version 0.12.1 makes hover answer the question directly: a cross-file name diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 17e759b..9f95b36 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -2,7 +2,7 @@ "name": "lucisv", "displayName": "lucisv — Verilog/SystemVerilog", "description": "Fast Verilog/SystemVerilog formatting, linting, navigation, refactoring, semantic highlighting and RTL design intelligence.", - "version": "0.12.1", + "version": "0.13.0", "publisher": "guoliangchen", "author": "Guoliang Chen", "license": "MIT",