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

Using type script definition in new custom language? #2869

Closed
nicolas-despres opened this issue Feb 9, 2016 · 2 comments
Closed

Using type script definition in new custom language? #2869

nicolas-despres opened this issue Feb 9, 2016 · 2 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@nicolas-despres
Copy link

Hi,
I am trying to use vsc with a proprietary language.
I managed to handle the syntax coloration easily.
For the completion I generated on my language in type script definition files (.d.ts). With that done, I have exactly what I want but it only works if I use javascript as my file language (and not my new own language)

So my question is:
Can I leverage Type Script Definition files for custom languages completion? If so, how would you do that?

Thanks for your help
Nicolas

@dbaeumer
Copy link
Member

This is currently only possible by doing the following:

  • writing an extension that handles your new language
  • then using the tsserver that comes from the TS team
  • generating .d.ts files on the fly and pipe them into the tsserver (e.g. open them with a content set)
  • map your positions to TS
  • ask the tsserver for code complete, ...
  • map positions back.

Sounds complicated and it actually is :-).

@dbaeumer dbaeumer added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Feb 11, 2016
@dbaeumer dbaeumer modified the milestone: Backlog Feb 11, 2016
@nicolas-despres
Copy link
Author

Ok thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants