20Tauri / DoxyDoxygen

The last word in code documentation generation
140 stars 5 forks source link

[Javascript] ALT + Q doesn't work with `new` operator #129

Closed GuimDev closed 5 years ago

GuimDev commented 5 years ago

doesn't work :

/*here: ALT+Q*/
const i2n = new function(key, arg1) {

works :

/*here: ALT+Q*/
const i2n = function(key, arg1) {
20Tauri commented 5 years ago

In the first example, I2n isn't recognised as an entity due to the javascript syntax file (it's directly DoxyDoxygen). Pressing Ctrl+Alt+Shift+P in the second example you should see entity.name.function.js not in the first one

Secondly, I'm not really understand what you expect. In the first example i2n sound link an object. Do you have a real example (with function call and expected result) ?

If you want to test the current DoxyDoxygen output, try /** then Enter

20Tauri commented 5 years ago

This report seems invalid. But I will add a support for "new Function" and "new GeneatorFunction" in the next release.

GuimDev commented 5 years ago

Thanks you, i will use /** then ||Enter||

Do you have a real example (with function call and expected result) ?

I didn't choose a good example.

/**
 * i2n interface
 * @constant
 * @type       {i2nInterface}
 */
const i2n = new i2nInterface();

Also :

const myEvent = new Event("i2n_init");

I'm waiting : @Event http://usejsdoc.org/tags-event.html

It's a shame not to be able to add our own Snippet or participate in this repos.

20Tauri commented 5 years ago

From day one, you can contribute and add you own documenting style. I have add another public repos with an example (HeaderDoc) And from 0.70.0, you can easiliy create/extend your own snippets using the doc_styles settings.

To share your contribution to the others, you can use package control Or simply contact me to include them in the core package (especially if you found and add missing snippets, and/or you write autofill rules)

Your suggested improvement @Event may be a good exercice to understand how docStyles work. Try to implement it.