Allow doc comments inside functions, for LSP

It would be nice to get more information about a variable, then just its type.
It works if I place the variable outside of the function, like

/// works
var tile: u16 = 0;

fn name() void {
    /// not works
    var tile: u16 = 0;
}

The documentation clearly says:

Doc comments are only allowed in certain places; it is a compile error to have a doc comment in an unexpected place, such as in the middle of an expression, …

But maybe it could be useful to document variables inside of a function ?
Only for the LSP, not the documentation generator.

Given that the variable is scoped to the function, what would be the benefit?

Just use // for your comment.
To get it working you might also need a zig LSP ticket :slight_smile: