-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add run test button #51
Add run test button #51
Conversation
@Vexu can you review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even after fixing the type error, setting zig.disableProblemMatcherForTest
to true
doesn't seem to do anything.
Otherwise this works great!
"description": "Additional flags to pass \"zig test\"" | ||
}, | ||
"zig.disableProblemMatcherForTest": { | ||
"type": "bool", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"type": "bool", | |
"type": "boolean", |
This fixes the Incorrect type. Expected "bool".
error when trying to use this setting.
if ( | ||
was_newline && | ||
text.length > i + 4 && | ||
text[i] === "t" && | ||
text[i + 1] === "e" && | ||
text[i + 2] === "s" && | ||
text[i + 3] === "t" && | ||
(text[i + 4] === " " || text[i + 4] === "\n") | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hardly seems like the best solution and breaks easily with badly formatted code:
test"foo" {}
test
"foo" {}
This adds a "Run test" button above the
test
keyword.zig.testArgs
to let you pass additional arguments to testszig.disableProblemMatcherForTest
if you don't want the problem matcher to be enabled for testsScreen.Recording.2021-05-23.at.6.03.58.PM.mov
Screenshot incase the video doesn't load:
It would be better to implement this via LSP, but I'm less familiar with that.