heavenshell / vim-jsdoc

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

Recent changes prevent Typescript support #63

Closed mhartington closed 7 years ago

mhartington commented 7 years ago

Hi there! It seems some changes in via https://github.com/heavenshell/vim-jsdoc/commit/45c7c7cef440a29f7bf24436640413e3d5d578ff now prevent typescript support.

When starting a sample js file, I can call :JsDoc But when using typescript, I get E492: Not an editor command: JsDoc

minimal vim that produces it.

set runtimepath+=~/.config/nvim/repos/github.com/Shougo/dein.vim/
call dein#begin(expand('~/.config/nvim'))
call dein#add('Shougo/dein.vim')
call dein#add('HerringtonDarkholme/yats.vim', {'on_ft': ['typescript']})
call dein#add('heavenshell/vim-jsdoc')
if dein#check_install()
  call dein#install()
endif

call dein#end()
filetype plugin indent on
set clipboard+=unnamedplus
heavenshell commented 7 years ago

@mhartington Thx for reporting. Hmm, it strange.

I could not reproduce your problem.

/**
 * foo
 *
 * @param {string} foo
 * @param {number} bar
 * @returns {string}
 */
function foo(foo: string = 'foo', bar: number = 1): string {
  return 'foo'
}

What about if you add on_ft option?

call dein#add('heavenshell/vim-jsdoc', {'on_ft': ['javascript', 'typescript']})

p.s. I don't use any third party plugin manger.

mhartington commented 7 years ago

Hmm, odd, did some tweaking of my rc and minimal rc and now it's working. Sorry for the noise!

heavenshell commented 7 years ago

@mhartington np, thx for reporting and using my plugin!