ziglang / vscode-zig

Zig language support for VSCode
https://marketplace.visualstudio.com/items?itemName=ziglang.vscode-zig
MIT License
528 stars 58 forks source link

Commenting-out individual doc comments produces invalid code #236

Open kj4tmp opened 6 hours ago

kj4tmp commented 6 hours ago

Given this example code:

/// This function does nothing
pub fn foo() void {}

Actual behavior:

If cursor is placed in a single doc comment line, doing ctrl+/ causes the following:

/ This function does nothing
pub fn foo() void {}

Which is not valid zig code.

Expected behavior:

// /// This function does nothing
pub fn foo() void {}

Which is similar to what I get when highlighting the whole block:

// /// This function does nothing
// pub fn foo() void {}
Techatrix commented 3 hours ago

VS Code does not support declaring multiple line comments for a language. https://github.com/Microsoft/vscode/issues/64659