Closed liyuanqiu closed 4 years ago
Same problem for me using neovim 0.2.2
Workaround to have the :JsDoc command place this in your vim config:
command! -register JsDoc call jsdoc#insert()
For your other problem, you need to enable prompting for those things.
let g:jsdoc_allow_input_prompt = 1
enables all prompts. There are other options to fine control the prompting.
@liyuanqiu @Jikstra Sorry for late response(I did not notice this issue :-().
That's so strange. In my enviorment, I can generate via :JsDoc
command.
@liyuanqiu Could you update your Vim more recent one?
@heavenshell Sorry I'm late too.
I prepared a pure newly installed Debian 8, then install vim from vim github, the version is 8.0.1733. Same problem.
I guess maybe your environment has some required installations that make :JsDoc
work. Could you please take a test in a pure newly installed Debian system? I can give you a cloud server for test if you need.
@liyuanqiu Thx for information. I have some questions.
I guess maybe your environment has some required installations that make :JsDoc work.
JsDoc.vim is pure Vim script and no dependency.
I can give you a cloud server for test if you need.
Sounds nice, but first of all could you answer my questions?
Forgot to comment.
One more question. What file do you open?(.js
? .jsx
? other?)
Could you show me what filetype(:set ft
) is.
@heavenshell
- What plugin manager do you use?
Vim 8 native plugin manager
git clone https://github.com/heavenshell/vim-jsdoc.git ~/.vim/pack/plugins/start/vim-jsdoc
- Could you show me your minimal vimrc?
No custom .vimrc file, all default.(Newly installed Debian 8, Newly installed Vim 8 with no custom configurations)
- Other plugin's command works fine?
After installed vim-jsdoc
, I installed vim-vue
and yats
, they all work fine.(But they don't need any command, just syntax highlighting.)
- macOS and Ubutsu 16.04 works fine at my local. Could you try other OS?
I tried on my macOS, same problem.
what filetype(:set ft) is
filetype=javascript
The extension name of my file is .js
Finally, I think it must be my fault on installation and configuration of this plugin. Could you please write a detail installation guide to help me using this plugin? I really need it.
@liyuanqiu Thank you.
Vim 8 native plugin manager
Umm, I also use Vim8's pack, but works fine.
Hit :J<TAB>
.
Finally, I think it must be my fault on installation and configuration of this plugin. Could you please write a detail installation guide to help me using this plugin? I really need it.
git clone https://github.com/heavenshell/vim-jsdoc.git ~/.vim/pack/plugins/start/vim-jsdoc
That's all... Very strange...
@heavenshell
Sorry for some incorrect feedback, after many trials, I found that if ~/.vimrc
or ~/_vimrc
existing, this plugin will not work, even if they are empty.
I'v send you an email which gives you a live host for testing.
You can login to that host, remove ~/.vimrc
, then vim a.js
, then :J<TAB>
, works fine.
But if you touch ~/.vimrc
, this plugin will not work.
the issue is still actual I'm using:
Could you show me your rtp?
let s:save_cpo = &cpo
set cpo&vim
let path = &rtp
let paths = split(path, ',')
for p in paths
if p =~ 'jsdoc'
echomsg 'jsdoc exists'
endif
endfor
let &cpo = s:save_cpo
unlet s:save_cpo
/path/to/rtp.vim
vim sample.js
:so /path/to/rtp.vim
If vim-jsdoc exists your rtp, it shows jsdoc exists
to Vim's cmd area.
If not, something wrong with your rtp.
@heavenshell that's what rtp show me and when i tried to use JsDoc also I've tried JsDoc on my other machine with macOS and everything is ok there
Thx for information! Hummm strange...
also I've tried JsDoc on my other machine with macOS and everything is ok there
Is it Vim? or Neovim? What is difference between ok and not ok machine?
Ver 2.0.0 was released.
I Change command
Sorry to ask such a question here, because this is not your bug for certain. But I googled a lot of time, no solution found. So I have to seek for help here.
I use Vim 8.0.707 in Debian 9, and I clone this git repository into this path: ~/.vim/pack/plugins/start/vim-jsdoc Then I open my js file, type
:JsDoc
, and see this error:E492: Not an editor command: JsDoc
But if I type:call jsdoc#insert()
, it will add some docs to my function without prompts like the gif in the README.mdSo how to setup my vim to enable
:JsDoc
and make it running like your gif?