VIM Semantic JavaScript completion with YouCompleteMe?

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.


At the moment there is no semantic completer for javascript available in YouCompleteMe. However, people are working on that. Here is the pending pull request for integrating JS Tern.

Without semantic completer available you are indeed limited to language agnostic completers, such as the identifier completer, filepath completer and snippet completer.

UPDATE: Tern has been integrated into YCM


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