{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/2869","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/2869/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/2869/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/2869/events","html_url":"https://github.com/Microsoft/vscode/issues/2869","id":132548881,"number":2869,"title":"Using type script definition in new custom language?","user":{"login":"nicolas-despres","id":10028497,"avatar_url":"https://avatars.githubusercontent.com/u/10028497?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-despres","html_url":"https://github.com/nicolas-despres","followers_url":"https://api.github.com/users/nicolas-despres/followers","following_url":"https://api.github.com/users/nicolas-despres/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-despres/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-despres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-despres/subscriptions","organizations_url":"https://api.github.com/users/nicolas-despres/orgs","repos_url":"https://api.github.com/users/nicolas-despres/repos","events_url":"https://api.github.com/users/nicolas-despres/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-despres/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-09T22:01:39Z","updated_at":"2016-02-11T11:27:45Z","closed_at":"2016-02-11T11:27:45Z","body":"Hi,\r\nI am trying to use vsc with a proprietary language. \r\nI managed to handle the syntax coloration easily.\r\nFor 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)\r\n\r\n**So my  question is:**\r\nCan I leverage Type Script Definition files for custom languages completion? If so, how would you do that?\r\n\r\nThanks for your help\r\nNicolas "},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/182815992","html_url":"https://github.com/Microsoft/vscode/issues/2869#issuecomment-182815992","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/2869","id":182815992,"user":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"created_at":"2016-02-11T11:27:45Z","updated_at":"2016-02-11T11:27:45Z","body":"This is currently only possible by doing the following:\r\n\r\n- writing an extension that handles your new language\r\n- then using the tsserver that comes from the TS team\r\n- generating .d.ts files on the fly and pipe them into the tsserver (e.g. open them with a content set)\r\n- map your positions to TS\r\n- ask the tsserver for code complete, ...\r\n- map positions back.\r\n\r\nSounds complicated and it actually is :-)."}}