Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ Set value to 1 to turn on detecting underscore starting functions as private con

**g:jsdoc_allow_shorthand** *default: 0*
Set value to 1 to allow ECMAScript6 shorthand syntax.

**g:jsdoc_param_description_seperator** *default: ' '*
Characters used to seperate @param name and description.
8 changes: 6 additions & 2 deletions autoload/jsdoc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ endif
if !exists('g:jsdoc_allow_shorthand')
let g:jsdoc_allow_shorthand = 0
endif
" Use seperator between @param name and description.
if !exists('g:jsdoc_param_description_seperator')
let g:jsdoc_param_description_seperator = " "
endif

" Return data types for argument type auto completion :)
function! jsdoc#listDataTypes(A,L,P)
Expand Down Expand Up @@ -139,9 +143,9 @@ function! jsdoc#insert()
if g:jsdoc_allow_input_prompt == 1
let l:argType = input('Argument "' . l:arg . '" type: ', '', 'custom,jsdoc#listDataTypes')
let l:argDescription = input('Argument "' . l:arg . '" description: ')
" Prepend space to start of description only if it was provided
" Prepend seperator to start of description only if it was provided
if l:argDescription != ''
let l:argDescription = ' ' . l:argDescription
let l:argDescription = g:jsdoc_param_description_seperator . l:argDescription
endif
call add(l:lines, l:space . ' * @param {' . l:argType . '} ' . l:arg . l:argDescription)
else
Expand Down
6 changes: 6 additions & 0 deletions doc/jsdoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ g:jsdoc_allow_shorthand *g:jsdoc_allow_shorthand*

Default value is '0'

g:jsdoc_param_description_seperator *g:jsdoc_param_description_seperator*

Characters used to seperate @param name and description
for more readable descriptions.

Default value is ' '

==============================================================================
CHANGELOG *jsdoc-changelog*
Expand Down