如何修改JSDoc块注释代码 [英] How to modify the JSDoc block comment code
问题描述
我可以修改默认的jsdoc注释以在新的锚点处添加其他星号吗?
Can I modify the default jsdoc comment to add an additional asterisk at anew anchor?
这里是函数:
function method(param, param) {
}
这是我自动完成/**
时VSC创建的内容:
Here is what VSC creates when I autocomplete /**
:
/**
* |
* @param {*} |
* @param {*} |
*/
这是我要修改为的内容:
Here is what I want to modify it to:
/**
* |
* @param {*} |
* @param {*} |
**/
推荐答案
You could try this extension: Document This.
然后在Windows计算机上......\.vscode\extensions\joelday.docthis-0.7.1\out\src\utilities.js
的代码中,编辑以下行:
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.
如果键入/**
,您将获得两个选项:vscode的内置jsdoc'er和文档此版本".
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 是快捷方式.
Ctrl-Alt-D+D is the shortcut.
这篇关于如何修改JSDoc块注释代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!