Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify the JSDoc block comment code

Can I modify the default jsdoc comment to add an additional asterisk at anew anchor?

Here is the function:

function method(param, param) {


}

Here is what VSC creates when I autocomplete /**:

/**
 * |
 * @param {*} | 
 * @param {*} |
 */

Here is what I want to modify it to:

/**
 * |
 * @param {*} | 
 * @param {*} |
 **/
like image 302
1.21 gigawatts Avatar asked Jan 24 '26 03:01

1.21 gigawatts


1 Answers

The implementation for the current behavior is here:

https://github.com/microsoft/vscode/blob/master/extensions/typescript-language-features/src/features/jsDocCompletions.ts#L15

Currently it is not possible to change the template through configuration.

If you are willing to lose support for the dynamic inclusion of defined parameters, you can define your own snippet, as described here:

https://code.visualstudio.com/docs/editor/userdefinedsnippets

like image 79
Slawomir Chodnicki Avatar answered Jan 26 '26 17:01

Slawomir Chodnicki



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!