Skip to content

Hot-reload settings, enable bare percentages, and add suppress quick fixes - #61

Merged
ViTeXFTW merged 7 commits into
devfrom
t3code/recover-lost-prs
Jul 19, 2026
Merged

Hot-reload settings, enable bare percentages, and add suppress quick fixes#61
ViTeXFTW merged 7 commits into
devfrom
t3code/recover-lost-prs

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

Summary

  • Add runtime settings reloading in the language server, including schema path, base INI roots, analysis debounce, map-ordering diagnostics, and formatting registration.
  • Make bare percentage parsing opt-in via analysis.allowPercentagesWithoutSign and propagate it through the analyzer.
  • Offer suppression quick fixes for error diagnostics too, and update the related spec coverage.
  • Refresh docs and VS Code extension behavior to match the new configuration flow.

Testing

  • cargo test -p zerosyntax-analysis --test spec
  • cargo test -p zerosyntax-analysis
  • cargo test -p zerosyntax-schema
  • python crates/server/tests/e2e.py target/debug/zerosyntax-lsp.exe
  • Not run: full workspace cargo test

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds hot-reloaded language server settings and expands percentage and quick-fix behavior. The main changes are:

  • Runtime reload for schema path, base INI roots, debounce, map-ordering diagnostics, and formatting registration.
  • Opt-in support for bare percentage values through analysis.allowPercentagesWithoutSign.
  • Suppression quick fixes for error diagnostics.
  • Updated VS Code settings, tests, and documentation for the new configuration flow.

Confidence Score: 4/5

Mostly safe to merge after the VS Code quick-fix settings target is fixed.

The core analyzer and server reload paths are covered by expanded tests. One contained bug remains where the bare-percentage quick fix writes a lower-precedence setting and can leave diagnostics unchanged.

editors/vscode/src/extension.ts

T-Rex T-Rex Logs

What T-Rex did

  • Reproduced the workspace override behavior by running a focused harness that loads the real extension activation code and invokes the zerosyntax.allowBarePercentages command, observing that workspaceValue=false and effective=false before the command and globalValue=true after the command.
  • Tried a real VS Code extension-test path but Electron could not launch due to a missing libgtk-3.so.0 in the environment.
  • Verified end-to-end checks by reviewing the trex-artifacts/lsp-e2e.log, which states that ALL E2E CHECKS PASSED and exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/server/src/backend.rs Introduces runtime settings reload, analyzer/index refresh paths, configurable debounce, and dynamic formatting registration.
crates/analysis/src/diagnostics.rs Adds opt-in handling for bare percentage values and tests the enabled/disabled behavior.
crates/analysis/src/actions.rs Allows suppression quick fixes for error diagnostics while still deduplicating and excluding unknown-suppression.
editors/vscode/src/extension.ts Adds runtime configuration synchronization and a bare-percentage quick fix; the quick fix writes only the global setting and can be shadowed by workspace settings.
editors/vscode/package.json Adds the bare percentage analysis setting to extension configuration metadata.
crates/server/tests/e2e.py Expands LSP e2e coverage for hot-reloaded settings, base roots, schema changes, progress, and dynamic formatting.

Reviews (1): Last reviewed commit: "feat: hot-reload ZeroSyntax settings" | Re-trigger Greptile

Comment thread editors/vscode/src/extension.ts Outdated
vscode.commands.registerCommand("zerosyntax.allowBarePercentages", async () => {
await vscode.workspace
.getConfiguration("zerosyntax")
.update(allowBarePercentagesSetting, true, vscode.ConfigurationTarget.Global);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Honor workspace overrides
This quick fix always writes zerosyntax.analysis.allowPercentagesWithoutSign to the global target, but workspace or folder settings have higher precedence. If a workspace has this setting explicitly false, running Allow percentages without % leaves the effective value false and the bad-percent diagnostic remains, so the advertised fix does not apply.

Artifacts

Repro: Node harness that loads the real extension activation code and invokes the registered command

  • Contains supporting evidence from the run (text/javascript; charset=utf-8).

Repro: harness output showing global true, workspace false, and effective false after command execution

  • Keeps the command output available without making the summary code-heavy.

Repro: generated VS Code extension test for the workspace override scenario

  • Contains supporting evidence from the run (text/typescript; charset=utf-8).

Repro: attempted VS Code extension test output showing Electron blocked by missing libgtk-3.so.0

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

@ViTeXFTW
ViTeXFTW merged commit f2f1ad1 into dev Jul 19, 2026
4 checks passed
@ViTeXFTW
ViTeXFTW deleted the t3code/recover-lost-prs branch August 13, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant