Skip to content

fix: "Troubleshoot server" config handling, working directory and copy button - #3058

Merged
rwols merged 2 commits into
mainfrom
fix/troubleshoot-config-copy
Oct 10, 2026
Merged

rwols merged 2 commits into
mainfrom
fix/troubleshoot-config-copy

Conversation

@rchl

@rchl rchl commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Changes to "LSP: Troubleshoot server":

  • Don't modify the window's server config. ServerTestRunner passed the window's ClientConfig directly to the plugin's pre-start hooks (on_pre_start_async / on_pre_start), so any changes they made to the command, env or initialization options stayed in the window's configuration and affected later starts. It now works on a copy made with ClientConfig.from_config(config, {}), like WindowManager.start_async.
  • Show the working directory the server was started in, under "Server Test Run". When none is set, it shows Sublime Text's own current directory with "(inherited from Sublime Text)". This makes problems like "Troubleshoot server" uses incorrect working directory #3002 visible in the report.
  • Render "Copy to clipboard" as a button. The link text has been HTML-escaped since 6225b00, so the <kbd> tag inside it showed up as literal text. The link is now wrapped in <kbd> and styled with the sheet's colors in sheets.css.
  • Rename the init_options label to initialization_options.
Before After
Before After

Checked with tox (pyright and ruff) and by opening the sheet in Sublime Text 4215 in the UnitTesting Docker container (screenshots above). No automated test covers the troubleshoot command.

Assisted-By: Claude Code:claude-opus-5-5

rchl added 2 commits October 8, 2026 20:25
ServerTestRunner passed the window's ClientConfig directly to the plugin's
pre-start hooks, so any changes they made to it (command, env,
initialization options) stayed in the window's configuration and affected
later starts. Work on a copy instead, like WindowManager.start_async does.

Also show the working directory the server was started in, so the report
can confirm or rule out working-directory problems.

Assisted-By: Claude Code:claude-opus-5-5
The link text has been HTML-escaped since 6225b00, so the <kbd> tag inside
it showed up as literal text. Wrap the link in <kbd> instead and style it
with the sheet's foreground and background colors.

Assisted-By: Claude Code:claude-opus-5-5
@rwols
rwols merged commit 5395773 into main Oct 10, 2026
9 checks passed
@rwols
rwols deleted the fix/troubleshoot-config-copy branch October 10, 2026 13:21
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.

2 participants