Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Nov 17, 2025

In the future, the VSCode extension will call 2 language servers.
Added a method to get different LSP configs for the different tools.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Nov 17, 2025
Copy link
Member Author

Sysix commented Nov 17, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix marked this pull request as ready for review November 18, 2025 12:06
@Sysix Sysix requested a review from camc314 as a code owner November 18, 2025 12:06
Copilot AI review requested due to automatic review settings November 18, 2025 12:06
Copilot finished reviewing on behalf of Sysix November 18, 2025 12:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the WorkspaceConfig class to support multiple language servers by splitting configuration into tool-specific methods. The toLanguageServerConfig() method now composes configs from toOxlintConfig() and toOxfmtConfig(), enabling the extension to provide different configurations for different LSP tools.

  • Extracted formatting-related config into a separate toOxfmtConfig() method
  • Refactored toOxlintConfig() to exclude formatting config using TypeScript's Omit utility type
  • Updated toLanguageServerConfig() to merge both configs using spread syntax

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
client/WorkspaceConfig.ts Split configuration into tool-specific methods (toOxlintConfig, toOxfmtConfig) and updated toLanguageServerConfig to compose them
tests/WorkspaceConfig.spec.ts Added test coverage for the new toOxlintConfig and toOxfmtConfig methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix force-pushed the 11-17-refactor_vscode_add_workspaceconfig_methods_for_different_lsp_tools branch from bd99750 to 0d63181 Compare November 18, 2025 12:12
@Sysix Sysix force-pushed the 11-17-refactor_vscode_add_workspaceconfig_methods_for_different_lsp_tools branch from 0d63181 to e70f0d3 Compare November 18, 2025 12:13
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 18, 2025
Copy link
Contributor

camc314 commented Nov 18, 2025

Merge activity

…ls (#15788)

In the future, the VSCode extension will call 2 language servers.
Added a method to get different LSP configs for the different tools.
@graphite-app graphite-app bot force-pushed the 11-17-refactor_vscode_add_workspaceconfig_methods_for_different_lsp_tools branch from e70f0d3 to 985d48f Compare November 18, 2025 12:19
@graphite-app graphite-app bot merged commit 985d48f into main Nov 18, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-17-refactor_vscode_add_workspaceconfig_methods_for_different_lsp_tools branch November 18, 2025 12:24
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants