Skip to content

feat(vscode): declare rstack.fmt.trace.server for the rs fmt language client - #21

Merged
fi3ework merged 1 commit into
mainfrom
feat/fmt-trace-server
Aug 19, 2026
Merged

feat(vscode): declare rstack.fmt.trace.server for the rs fmt language client#21
fi3ework merged 1 commit into
mainfrom
feat/fmt-trace-server

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Summary

Since fmt moved to rs fmt --lsp (#12) the old Formatting completed in Xms line is gone and there was no way to see how long a format request took: the language client's trace setting was neither declared nor namespaced (rstack-fmt.trace.server worked only as an undeclared key).

Align with how the other LSP-based formatter extensions expose this — a declared <clientId>.trace.server whose trace lands in the main output channel — rather than re-adding a custom timing log:

  • Rename the fmt client id rstack-fmtrstack.fmt, so vscode-languageclient reads rstack.fmt.trace.server and hot-reloads it on change (no restart involved).
  • Set traceOutputChannel to the stack's own channel, so Received response 'textDocument/formatting - (n)' in Xms shows up in Rstack: rs fmt next to the other logs instead of a separate per-folder "Trace" channel.
  • Declare rstack.fmt.trace.server (off / messages / verbose, default off, scope window) in package.json; document it in the README.

Verified: pnpm lint, pnpm test:unit, and VSCODE_CLI=1 pnpm test:e2e vscode all pass locally.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

… client

The old stdin-based fmt stack logged `Formatting completed in Xms`; that line
went away with the move to `rs fmt --lsp`, and the language client had no
declared trace setting to fall back on. Align with the other LSP-based
formatter extensions instead of re-adding a custom timing log:

- Rename the client id to `rstack.fmt` so vscode-languageclient reads (and
  hot-reloads) `rstack.fmt.trace.server` on its own.
- Point `traceOutputChannel` at the stack's output channel so trace lines
  (`Received response 'textDocument/formatting' in Xms`) land next to the
  other fmt logs instead of a separate per-folder channel.
- Declare the setting in package.json and document it in the README.
@fi3ework
fi3ework merged commit aca090c into main Aug 19, 2026
5 of 6 checks passed
@fi3ework
fi3ework deleted the feat/fmt-trace-server branch August 19, 2026 06:19
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