Reputation: 17850
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 {*} |
**/
Upvotes: 3
Views: 952
Reputation: 182661
You could try this extension: Document This.
And then in its code at ......\.vscode\extensions\joelday.docthis-0.7.1\out\src\utilities.js
on a Windows machine, edit this line:
// sb.appendLine(" */"); // to
sb.appendLine(" **/");
Reload the window and it seems to work.
If you type /**
you will get two options: vscode's built-in jsdoc'er and the Document This version.
If you don't formerly fork this extension for your own use you may have to redo the edit if the extension is updated on the future - but it is pretty simple.
Ctrl-Alt-D+D is the shortcut.
Upvotes: 1
Reputation: 1545
The implementation for the current behavior is here:
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
Upvotes: 1