ziglang / vscode-zig

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

Commenting-out individual doc comments produces invalid code #236

Open kj4tmp opened 1 month ago

kj4tmp commented 1 month 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 1 month ago

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