Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Ensure workspace/configuration capability was sent by the client before using the call #1505

Closed
jakebailey opened this issue Sep 4, 2019 · 0 comments · Fixed by #1506
Closed
Assignees
Labels
protocol LSP compliance

Comments

@jakebailey
Copy link
Member

#1492 uses the workspace/configuration call back to the client in order to fetch the configuration earlier than the client would normally send it.

Unfortunately, I missed the fact that this functionality is optional and needs to be gated against a client capability.

/**
 * Workspace specific client capabilities.
 */
export interface WorkspaceClientCapabilities {
	// ...
	/**
	 * The client supports `workspace/configuration` requests.
	 *
	 * Since 3.6.0
	 */
	configuration?: boolean;

If the client doesn't say it has this request, we can't call it and have to resort to the double-reload configuration change (if we want to really get rid of searchPaths in the initialization options).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
protocol LSP compliance
Projects
None yet
1 participant