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

refactor: clean up #512

Merged
merged 2 commits into from
Apr 17, 2023
Merged

refactor: clean up #512

merged 2 commits into from
Apr 17, 2023

Conversation

alenakhineika
Copy link
Contributor

@alenakhineika alenakhineika commented Apr 14, 2023

Description

This PR extracts refactoring, that was done as part of the TypeScript service investigation PR. We removed help signatures out of the Efficient Query Development in VSCode epic, but some clean up can be merged separately here.

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

{ scheme: 'untitled', language: 'javascript' },
{ scheme: 'file', language: 'javascript' },
{ pattern: '**/*.mongodb.js' },
{ pattern: '**/*.mongodb' },
Copy link
Contributor Author

@alenakhineika alenakhineika Apr 14, 2023

Choose a reason for hiding this comment

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

Register language server only for playgrounds.

@@ -88,6 +88,9 @@ export default class LanguageServerController {
}

async startLanguageServer(): Promise<void> {
// Start the client. This will also launch the server.
await this._client.start();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not see a difference in behavior between having or skipping this step. But to be on the safer side let's have it as it is in vscode examples.

}

// Stop the language server.
return this._client.stop();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also aligement with vscode examples.

export class Visitor {
_state: CompletionState;
_state: CompletionState | ExportToLanguageState | {};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For better debugging, use separate states for different use cases to better understand what parameters affect the behavior.

@alenakhineika alenakhineika requested a review from Anemy April 17, 2023 09:48
@alenakhineika alenakhineika merged commit 6fb3732 into main Apr 17, 2023
@alenakhineika alenakhineika deleted the clean-up branch April 17, 2023 11:01
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