-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preliminary work on typescript/tsserver #101
Comments
Typescript server provides more features besides just completion like goto-defintion, rename symbols and so on. With large project is makes sense to just have one typescript server running since they can take around 1gb ram. Another option would be to use an existing typescript plugin and use that for completion like https://github.com/prabirshrestha/asyncomplete-tscompletejob.vim. |
The typescript completion is implemented at https://github.com/maralla/completor-typescript. |
Why don't implement it in completor @maralla ? |
I don't use typescript. And I think it's better to keep completor lightweight. |
I've done some work throwing together a typescript module for completor. I didn't want to submit a pull request because I didn't write unit-tests for it, and I'm not sure if what I did is the best way (or even a good way) to do it.
TSServer requires a file to be "opened" before doing completions on it, i.e. send the open command to TSServer with the filename. I don't know if completor has facilities for this in place, and I don't know enough vimscript to try that route, so I threw it in the
request
function. That means the completions don't start until the second request.TSServer also does much more than completions, but is painfully under-documented. I had enough after getting this working.
So feel free to use this as a starting point.
https://gist.github.com/sloat/6ef3a0cc582dc00208e8dde6cfc1d785
The text was updated successfully, but these errors were encountered: