-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default message depending on the type #36
Comments
@IonicaBizau Add following setting to your let g:jsdoc_type_hook = {
\ 'object': 'An object containing the following fields',
\ 'function': 'Callback function'
\ } If type is
Wow, Thank you very much. You know Vim is charity ware |
@heavenshell Thanks! Almost there! ❇️ The thing I still need is to be able to input a custom description (currently it seems that if I configure a hook for Anyway, nice work! 😸 |
Please explain to me little bit more? let g:jsdoc_custom_args_hook = {
\ 'callback\|cb': {
\ 'type': '{function}',
\ 'description': 'The callback function.'
\ }
\}
let g:jsdoc_type_hook = {
\ 'object': 'An object containing the following fields',
\ 'function': 'Callback function'
\ } Followings are steps to reproduce. function foo(bar, baz, callback) {
}
Generated JSDoc is following. /**
* foo
*
* @param {object} bar An object containing the following fields
* @param {number} baz foo
* @param {function} callback The callback function.
*/
function foo(bar, baz, callback) {
}
|
Before this I want to get |
@IonicaBizau |
@IonicaBizau let g:jsdoc_type_hook = {
\ 'object': {
\ 'description': 'An object containing the following fields',
\ 'force_override': 1,
\ },
\ 'function': 'Function description'
\ } If you set |
@heavenshell Works nice! Thank you sooooo much! ✨ |
Merged to master. a0c8603 |
Is it possible to add a way to define default descriptions depending on the type? Like, #24, but after providing the type I want to just press Enter and create the description automagically.
For example:
Object
, then I press twice Enter and I want to get@param {Object} arg An object containing the following fields:
(which is supposed to be configured somewhere in.vimrc
).Btw, do you have a PayPal account? I'm happy to donate you some 💲 for making my life easier using this plugin. 😄
The text was updated successfully, but these errors were encountered: