Skip to content
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

Open
sloat opened this issue Apr 19, 2017 · 4 comments
Open

Preliminary work on typescript/tsserver #101

sloat opened this issue Apr 19, 2017 · 4 comments

Comments

@sloat
Copy link

sloat commented Apr 19, 2017

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

@prabirshrestha
Copy link

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.
Or support https://github.com/Quramy/tsuquyomi
Or send PR to https://github.com/mhartington/nvim-typescript to support completor.vim sources. There is already one for deoplete and there is a open issue for nvim-completion-manager.

@maralla
Copy link
Owner

maralla commented Oct 30, 2017

The typescript completion is implemented at https://github.com/maralla/completor-typescript.

@ghost
Copy link

ghost commented Oct 30, 2017

Why don't implement it in completor @maralla ?

@maralla
Copy link
Owner

maralla commented Oct 31, 2017

I don't use typescript. And I think it's better to keep completor lightweight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants