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

Activate the extension automatically #344

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@
"Programming Languages"
],
"activationEvents": [
"onLanguage:starlark",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's keep onLanguage:starlark, on the off chance case someone opens a .bzl file in a workspace without any of the other workspaceContains triggers. Doesn't hurt.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

According to VS Code's documentation, the onLanguage:starlark activation event is unnecessary:

Beginning with VS Code 1.74.0, languages contributed by your extension do not require a corresponding onLanguage activation event declaration for your extension to be activated.

Note that this extension only support VSCode >= 1.85.0

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated the description of this PR to also include the reasoning on why I removed all pre-existing activation events

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it, thanks, sounds good!

"onView:bazelWorkspace",
"onCommand:bazel.refreshBazelBuildTargets",
"onCommand:bazel.getTargetOutput",
"onCommand:bazel.info.bazel-bin",
"onCommand:bazel.info.bazel-genfiles",
"onCommand:bazel.info.bazel-testlogs",
"onCommand:bazel.info.execution_root",
"onCommand:bazel.info.output_base",
"onCommand:bazel.info.output_path"
"workspaceContains:**/BUILD",
"workspaceContains:**/WORKSPACE",
"workspaceContains:**/WORKSPACE.bazel",
"workspaceContains:**/MODULE.bazel",
"workspaceContains:**/REPO.bazel"
],
"main": "./out/src/extension/extension",
"contributes": {
Expand Down Expand Up @@ -475,4 +470,4 @@
"vscode-uri": "^3.0.2",
"which": "^4.0.0"
}
}
}