Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Apr 19, 2025

Currently working on supporting multiple workspace folder. workspace/didChangeConfiguratoin does not specific the Workspace, so some clients expect to request them.
We need to check if the client support this or fallback to a global configuration change (changing all workspaces).

ChatGPT:

what if workspace/configuration is not supported by the clinet
ChatGPT:
Ah, good follow-up — if the client does not support workspace/configuration, things get more limited and require some careful handling.
🔧 First: Check If the Client Supports It
When your language server receives the initialize request from the client, it includes its capabilities. Look for:

"capabilities": {
  "workspace": {
    "configuration": true
  }
}

If that configuration field is false or missing, then you cannot use workspace/configuration, and the client will only send global settings via workspace/didChangeConfiguration.

@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 Apr 19, 2025
Copy link
Member Author

Sysix commented Apr 19, 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 April 19, 2025 13:27
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 19, 2025

CodSpeed Instrumentation Performance Report

Merging #10507 will create unknown performance changes

Comparing 04-19-refactor_language_server_do_not_request_for_worspace_configuration_when_the_client_does_not_support_it (db05a15) with main (9f9e0e5)

Summary

🆕 36 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 codegen[checker.ts] N/A 22.1 ms N/A
🆕 codegen_sourcemap[checker.ts] N/A 65.1 ms N/A
🆕 formatter[antd.js] N/A 708.2 ms N/A
🆕 formatter[react.development.js] N/A 8 ms N/A
🆕 formatter[typescript.js] N/A 1.1 s N/A
🆕 isolated-declarations[vue-id.ts] N/A 58.4 ms N/A
🆕 lexer[RadixUIAdoptionSection.jsx] N/A 21.2 µs N/A
🆕 lexer[antd.js] N/A 24.8 ms N/A
🆕 lexer[cal.com.tsx] N/A 5.9 ms N/A
🆕 lexer[checker.ts] N/A 14.9 ms N/A
🆕 lexer[pdf.mjs] N/A 3.9 ms N/A
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.7 ms N/A
🆕 linter[cal.com.tsx] N/A 1.2 s N/A
🆕 linter[checker.ts] N/A 3 s N/A
🆕 mangler[antd.js] N/A 15.9 ms N/A
🆕 mangler[react.development.js] N/A 293.7 µs N/A
🆕 mangler[typescript.js] N/A 39.4 ms N/A
🆕 minifier[antd.js] N/A 163.6 ms N/A
🆕 minifier[react.development.js] N/A 1.8 ms N/A
🆕 minifier[typescript.js] N/A 287.9 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@Sysix Sysix force-pushed the 04-19-refactor_language_server_do_not_request_for_worspace_configuration_when_the_client_does_not_support_it branch from ebafe04 to 246d6dc Compare April 20, 2025 17:02
@Sysix Sysix force-pushed the 04-17-refactor_language_server_move_code_actions_into_own_file branch from 0fb50ec to 1fa3178 Compare April 20, 2025 17:02
@Sysix Sysix requested review from camc314 and camchenry April 20, 2025 17:34
@Sysix Sysix added the 0-merge Merge with Graphite Merge Queue label Apr 21, 2025
Copy link
Member Author

Sysix commented Apr 21, 2025

Merge activity

…when the client does not support it (#10507)

Currently working on supporting multiple workspace folder. `workspace/didChangeConfiguratoin` does not specific the Workspace, so some clients expect to request them.
We need to check if the client support this or fallback to a global configuration change (changing all workspaces).

ChatGPT:

> what if workspace/configuration is not supported by the clinet
ChatGPT:
 Ah, good follow-up — if the client does not support workspace/configuration, things get more limited and require some careful handling.
🔧 First: Check If the Client Supports It
When your language server receives the initialize request from the client, it includes its capabilities. Look for:
```
"capabilities": {
  "workspace": {
    "configuration": true
  }
}
```
> If that configuration field is false or missing, then you cannot use workspace/configuration, and the client will only send global settings via workspace/didChangeConfiguration.
@graphite-app graphite-app bot force-pushed the 04-17-refactor_language_server_move_code_actions_into_own_file branch from 1fa3178 to 9f9e0e5 Compare April 21, 2025 18:12
@graphite-app graphite-app bot force-pushed the 04-19-refactor_language_server_do_not_request_for_worspace_configuration_when_the_client_does_not_support_it branch from 246d6dc to db05a15 Compare April 21, 2025 18:12
Base automatically changed from 04-17-refactor_language_server_move_code_actions_into_own_file to main April 21, 2025 18:16
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 21, 2025
@graphite-app graphite-app bot merged commit db05a15 into main Apr 21, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 04-19-refactor_language_server_do_not_request_for_worspace_configuration_when_the_client_does_not_support_it branch April 21, 2025 18:17
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