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

fix activation event when the workspace contains a build.zig #227

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

Techatrix
Copy link
Collaborator

The glob pattern */build.zig means that the extension gets activated iff a subfolder contains a build.zig. Obviously we want to look in the root folder so the pattern build.zig should be used.

Copy link
Member

@Vexu Vexu left a comment

Choose a reason for hiding this comment

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

Seems reasonable but maybe we should use onLanguage instead? https://code.visualstudio.com/api/references/activation-events#onLanguage

@Techatrix
Copy link
Collaborator Author

onLanguage:zig is already happening. It is automatically added when declaring the zig language. The problem with only relying on onLanguage is that the extension doesn't get activated before opening a .zig file. I often find myself in a new project with no open documents where I then use the integrated terminal to run zig build just to realize that the terminal doesn't have Zig in PATH because the extension hasn't started.

@Techatrix Techatrix merged commit 36fbe3a into master Aug 31, 2024
2 checks passed
@Techatrix Techatrix deleted the techatrix/activation-event branch August 31, 2024 12:45
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