Helps you generate JSDoc from kakoune
Copy the jsdoc.kak
file in your ~/.config/kak/autoload/
folder.
It will add the jsdoc
function when a javascript
file is detected
To generate jsdoc, put the cursor in a line containing a function declaration, then run
:jsdoc
It will parses the function's declaration and extract the name and parameters of the function
You could also add a shortcut to generate doc quickly (here ,d
)
hook global WinSetOption filetype=javascript %{
map global user d ':jsdoc<ret>' -docstring "Generate jsdoc"
}
- it only works for function declaration
- it's having some hard times with destructured objects as function parameters