heavenshell / vim-jsdoc

Generate JSDoc to your JavaScript code.
BSD 3-Clause "New" or "Revised" License
452 stars 44 forks source link

Full regex mode for jsdoc_custom_args_hook #49

Closed davidosomething closed 8 years ago

davidosomething commented 8 years ago

E.g. for

function myfunc(_isPrivateBoolean, isanother) {
}

the settings:

let g:jsdoc_custom_args_regex_only = 1
let g:jsdoc_custom_args_hook = {
                      \   '^_\?is': {
                      \     'type': '{Boolean}'
                      \   },
}

will yield

/**
 * @param {Boolean} _isPrivateBoolean
 * @param {Boolean} isanother
 */
function myfunc(_isPrivateBoolean, isanother) {
}

addresses #47 in a backwards compatible manner

heavenshell commented 8 years ago

Thx for pull request! I'll look into it in this week end. Little bit busy... :cry:

davidosomething commented 8 years ago

Going to reopen this in a dev branch #51