is there any way to get semantic javascript code pletion in VIM?
I've tried YouCompleteMe (YCM) and it gives me some code pletion, however it is purely based upon my current buffer (or buffers?).
When I explicitly call :YcmCompleter
, I get
ValueError: No semantic pleter exists for filetypes: ['javascript']
I'm mostly working in node:sails.js and angularjs. I'd really appreciate a way of getting library methods suggested while typing (e.g. for angular, protractor / mocha / jasmine).
Thanks!
is there any way to get semantic javascript code pletion in VIM?
I've tried YouCompleteMe (YCM) and it gives me some code pletion, however it is purely based upon my current buffer (or buffers?).
When I explicitly call :YcmCompleter
, I get
ValueError: No semantic pleter exists for filetypes: ['javascript']
I'm mostly working in node:sails.js and angularjs. I'd really appreciate a way of getting library methods suggested while typing (e.g. for angular, protractor / mocha / jasmine).
Thanks!
Share Improve this question asked Mar 11, 2014 at 18:43 danbadanba 8771 gold badge13 silver badges34 bronze badges 1-
Unfortunately, I don't think YCM supports any kind of JavaScript semantic pletion engine.
Tern
is a semantic engine for JavaScript, and there's a Vim plugin for it, but I'm not sure how well it would work alongside YCM. – voithos Commented Mar 11, 2014 at 19:10
3 Answers
Reset to default 4From YCm's huge README:
YCM will use your omnifunc (see :h omnifunc in Vim) as a source for semantic pletions if it does not have a native semantic pletion engine for your file's filetype. Vim es with okayish omnifuncs for various languages like Ruby, PHP etc. It depends on the language.
Tern for Vim provides the kind of pletion you are looking for via Vim's native omni-pletion (<C-x><C-o>
). With that plugin installed, YCM should be able to use it transparently for JavaScript pletion.
These answers being very outdated, and since I've struggle a little bit with it, here is an update:
Javascript semantic support in Vim with YouCompleteMe is now supported via TSServer engine as explained in Ycm's HUGE readme
I've got the information thanks to : https://medium./parallel-thinking/actually-great-vim-javascript-pletion-eaefa1cb443d
At the moment there is no semantic pleter for javascript available in YouCompleteMe. However, people are working on that. Here is the pending pull request for integrating JS Tern.
Without semantic pleter available you are indeed limited to language agnostic pleters, such as the identifier pleter, filepath pleter and snippet pleter.
UPDATE: Tern has been integrated into YCM