clausreinke / typescript-tools

(repo no longer active) Tools related to the TypeScript language
Apache License 2.0
266 stars 29 forks source link

wondering if it's possible to make it work with YouCompleteMe #27

Closed Aaron2Ti closed 10 years ago

Aaron2Ti commented 10 years ago

https://github.com/Valloric/YouCompleteMe

clausreinke commented 10 years ago

No plans like this, sorry. But typescript-tools implements Vim's standard omnifunc protocol, which YouCompleteMe claims to support.

MalucoMarinero commented 10 years ago

Confirming that it does work just fine with YouCompleteMe through the omnifunc protocol.

clausreinke commented 10 years ago

Thanks for the confirmation.

travisby commented 10 years ago

@MalucoMarinero could you share the pertinent parts of your .vimrc? I've been pulling my hair out trying to make the two work together.

MalucoMarinero commented 10 years ago

@travisby Nothing at all really is specific to it.

Installed with Vundle YouCompleteMe default settings + Typescript Tools default settings. Using TSSstarthere to get the server connection going. It's nothing real time right now (where it gets updated constantly), but it's enough to use following an initial parse.

Going to be going back into a typescript project shortly so I'll have some more experience with the tools then.

icecreammatt commented 9 years ago

@travisby I just installed typescript today and it worked out of the box with YouCompleteMe. You can view my vimrc here

EDIT: Whoops I noticed after writing this that I used a different plugin for vim. I found this thread when I was trying to confirm if it was just working natively or just was the YouCompleteMe working off of the known variables in a file.

SirVer commented 9 years ago

I just installed this and it does work out of the box with YouCompleteMe. To make it trigger automatically after a "." I added a small blib to my vimrc.

if !exists("g:ycm_semantic_triggers")
   let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']

I suggest adding that into this ftplugin as it is save even if people do not use YCM.

My complete setup using YouCompleteMe, typescript-tools, typescript-vim, and NeoBundle as my plugin manager looks like this:

NeoBundle 'clausreinke/typescript-tools'
NeoBundle 'leafgarland/typescript-vim'
NeoBundle 'Valloric/YouCompleteMe'

if !exists("g:ycm_semantic_triggers")
   let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']

Now opening a .ts file and running :TSSstarthere gives me nice completion and syntax highlighting. Fabulous example of technology just fitting together nicely, thanks to everybody involved for a Job well done!

danihodovic commented 9 years ago

@SirVer Thanks for the tip! Do you have any idea on how I can get paramteres to pop up?

SirVer commented 9 years ago

@dani-h I do not understand the question. With my setup described above, the parameters pop up after each '.' automatically. However there seems to be no support for typescript 1.4 features in this repo yet, so sometimes it breaks down.

clausreinke commented 9 years ago

@SirVer TypeScript 1.4 support (or rather: v1.5, the current github version) is available in a branch testing_ts1.4 - see also #39 . Note that a few things have changed, and may still change, as we follow upstream developments (hence the testing branch;-).

SirVer commented 9 years ago

@clausreinke I felt that was WIP. I tried to use it with a small angular toy project and it failed to pick up the definitions from https://github.com/borisyankov/DefinitelyTyped/blob/master/angularjs/angular.d.ts most of the time (it only worked once and it threw an error message and stopped working later). Do you want bug reports for that branch?

clausreinke commented 9 years ago

@SirVer yes, please - the testing branch is far enough along that bug reports are welcome. I hope to fix the ones I know about next week.