is there any way to get semantic javascript code completion in VIM?
I've tried YouCompleteMe (YCM) and it gives me some code completion, however it is purely based upon my current buffer (or buffers?).
When I explicitly call :YcmCompleter
, I get
ValueError: No semantic completer 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!
From YCm's huge README:
YCM will use your omnifunc (see :h omnifunc in Vim) as a source for semantic completions if it does not have a native semantic completion engine for your file's filetype. Vim comes with okayish omnifuncs for various languages like Ruby, PHP etc. It depends on the language.
Tern for Vim provides the kind of completion you are looking for via Vim's native omni-completion (<C-x><C-o>
). With that plugin installed, YCM should be able to use it transparently for JavaScript completion.
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.com/parallel-thinking/actually-great-vim-javascript-completion-eaefa1cb443d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With