mooz / js-doc

Insert JsDoc style comment easily in Emacs
60 stars 19 forks source link

Function doc always inserted at beginning of file #23

Open tavurth opened 6 years ago

tavurth commented 6 years ago

Running spacemacs & 25.2.2.

When I run the command js-doc-insert-function-doc or js-doc-insert-function-doc-snippet these snippets are always inserted at the beginning of the file.

The following code should reproduce this issue:

function myTestFunction(paramA, paramB)) {
}

const myTestFunctionTwo = (paramA, paramB) => {
}

When entering either function and running the above commands, the doc snippet will always be added at the top of the file.

tavurth commented 5 years ago

This is likely a spacemacs issue, as it's fixed on their develop, but not working on the old master.

cmatzenbach commented 5 years ago

I am experiencing the same issue in vanilla emacs. Each of my files contains one exported class and no matter where I run the command to insert the doc comment, it is added to the beginning of the file.