Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register viewSyntaxTree conditionally depending of server capability #77

Closed
wants to merge 2 commits into from

Conversation

piotmag769
Copy link
Contributor

No description provided.

@piotmag769 piotmag769 requested a review from a team as a code owner February 7, 2025 14:26
@piotmag769 piotmag769 requested review from mkaput and integraledelebesgue and removed request for a team February 7, 2025 14:26
@piotmag769 piotmag769 changed the title Register viewSyntaxTree conditionally depending of server capability Register viewSyntaxTree conditionally depending of server capability Feb 7, 2025
@piotmag769 piotmag769 changed the base branch from main to essa February 7, 2025 14:27
@piotmag769 piotmag769 force-pushed the conditional-view-syntax-tree branch from e102bec to 7382e50 Compare February 7, 2025 14:31
Comment on lines +200 to +213
ctx.extension.subscriptions.push(
client.onRequest(lsp.RegistrationRequest.type, ({ registrations }) => {
for (const reg of registrations) {
if (reg.method === "custom/ViewSyntaxTree") {
vscode.commands.executeCommand(
"setContext",
"cairo1.viewSyntaxTreeCommandAvailable",
true,
);
registerViewSyntaxTreeProvider(client, ctx);
}
}
}),
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the relevant part, the rest is just a fix of disposables that were forgotten to push to subscriptions

@piotmag769 piotmag769 force-pushed the conditional-view-syntax-tree branch from 904db71 to 90c9528 Compare February 7, 2025 14:37
Base automatically changed from essa to main February 7, 2025 15:17
@piotmag769 piotmag769 force-pushed the conditional-view-syntax-tree branch from 90c9528 to 4d99392 Compare February 7, 2025 16:13
@piotmag769
Copy link
Contributor Author

Closing in favour of PR stack starting #78

@piotmag769 piotmag769 closed this Feb 7, 2025
@piotmag769 piotmag769 deleted the conditional-view-syntax-tree branch February 7, 2025 16:25
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