Quramy / tsuquyomi

A Vim plugin for TypeScript
http://www.vim.org/scripts/script.php?script_id=5151
1.39k stars 72 forks source link

Autocompletion with YouCompleteMe #24

Open alihammad-gist opened 9 years ago

alihammad-gist commented 9 years ago

How to automatically show completion menu without explicitly triggering it with shortcut. YouCompleteMe isn't showing suggestion from tsuquyomi. How can i make both of them work together?

Quramy commented 9 years ago

Sorry, I don't use YouCompleteMe. Consider looking at ymcd TypeScript integration https://github.com/Valloric/ycmd/pull/161 .

mkusher commented 9 years ago

I've just added ycm semantic trigger in my vimrc:

let g:ycm_semantic_triggers['typescript'] = ['.']

or full list:

let g:ycm_semantic_triggers =  {
            \   'c' : ['->', '.'],
            \   'objc' : ['->', '.'],
            \   'ocaml' : ['.', '#'],
            \   'cpp,objcpp' : ['->', '.', '::'],
            \   'perl' : ['->'],
            \   'php' : ['->', '::', '"', "'", 'use ', 'namespace ', '\'],
            \   'cs,java,javascript,typescript,d,python,perl6,scala,vb,elixir,go' : ['.'],
            \   'html': ['<', '"', '</', ' '],
            \   'vim' : ['re![_a-za-z]+[_\w]*\.'],
            \   'ruby' : ['.', '::'],
            \   'lua' : ['.', ':'],
            \   'erlang' : [':'],
            \   'haskell' : ['.', 're!.']
            \ }