How to generate jsDoc stubs in .js files?
I'm trying to generate jsDoc documentation stubs in .js files. The Help site says jsDoc is supported and links to the JavaDoc instructions (ie. type *// and hit 'Enter'), which work for me in .java files, but I can't get the same auto stub generation to work in .js files. I just type /** and hit 'Enter' and nothing happens. Is there a setting that I'm missing to activate this? Do I need an additional plugin?
Thanks for any help!
Please sign in to leave a comment.
Anyone know if this is possible?
Yes, it should work if there is text after the doc (at least one newline).
What do you mean 'text after the doc' ? Can you give me an example of how it works?
In a .java file I type /** then hit 'Enter' and it generates this automatically:
/**
*
*/
But not sure how to do the same in .js files....
Here is an example but it didn't work for me:
https://www.jetbrains.com/help/idea/creating-jsdoc-comments.html#d102825e71
Hope it helps.
Works fine for me - hitting Enter after /** in
correctly generates
Please provide exact code snippet/steps you have tried
I try with the same combination Elena. In my case, it generates the jsdocs without @param or return.
can you repeat it in an empty file? Create a new .js file, add a method, try generating JSdoc stubs - what is the result?