{"action":"created","comment":{"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/comments/90408903","pull_request_review_id":10924372,"id":90408903,"diff_hunk":"@@ -338,6 +338,847 @@ export default class TypeScriptService {\n \t\t});\n \t}\n \n+\tgetDocumentSymbol(params: DocumentSymbolParams): Promise<SymbolInformation[]> {\n+\t\tconst uri = params.textDocument.uri;\n+\t\treturn this.ensureFilesForHoverAndDefinition(uri).then(() => {\n+\t\t\tconst fileName = util.uri2path(uri);\n+\t\t\tconst config = this.projectManager.getConfiguration(uri);\n+\t\t\treturn config.prepare(this.connection).then(() => {\n+\t\t\t\tthis.projectManager.syncConfiguration(config, this.connection);\n+\t\t\t\tconst sourceFile = config.program.getSourceFile(fileName);\n+\t\t\t\tconst tree = config.service.getNavigationTree(fileName);\n+\t\t\t\tconst limit = 100000;\n+\t\t\t\tconst result: SymbolInformation[] = [];\n+\t\t\t\tthis.flattenNavigationTreeItem(tree, null, sourceFile, result, limit);\n+\t\t\t\treturn Promise.resolve(result);\n+\t\t\t});\n+\t\t});\n+\t}\n+\n+\tgetWorkspaceReference(params: util.WorkspaceReferenceParams): Promise<util.ReferenceInformation[]> {\n+\t\tconst refInfo: util.ReferenceInformation[] = [];\n+\t\treturn this.ensureFilesForWorkspaceSymbol().then(() => {\n+\t\t\treturn Promise.all(this.projectManager.getConfigurations().map((config) => {\n+\t\t\t\treturn config.prepare(this.connection).then((config) => {\n+\t\t\t\t\tthis.projectManager.syncConfiguration(config, this.connection);\n+\t\t\t\t\tfor (let source of config.service.getProgram().getSourceFiles()) {\n+\t\t\t\t\t\tif (source.fileName.indexOf(\"/node_modules/\") !== -1) {\n+\t\t\t\t\t\t\tcontinue;\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tthis.walkMostAST(source, (node) => {\n+\t\t\t\t\t\t\tswitch (node.kind) {\n+\t\t\t\t\t\t\t\tcase ts.SyntaxKind.Identifier: {\n+\t\t\t\t\t\t\t\t\tconst fileName = source.fileName.startsWith(\"/\") ? source.fileName.substr(1) : source.fileName;","path":"src/typescript-service.ts","position":52,"original_position":52,"commit_id":"4743266a6cf67f27315f8f2f02dfa03612c2fad4","original_commit_id":"4743266a6cf67f27315f8f2f02dfa03612c2fad4","user":{"login":"alexsaveliev","id":7010538,"avatar_url":"https://avatars.githubusercontent.com/u/7010538?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsaveliev","html_url":"https://github.com/alexsaveliev","followers_url":"https://api.github.com/users/alexsaveliev/followers","following_url":"https://api.github.com/users/alexsaveliev/following{/other_user}","gists_url":"https://api.github.com/users/alexsaveliev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsaveliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsaveliev/subscriptions","organizations_url":"https://api.github.com/users/alexsaveliev/orgs","repos_url":"https://api.github.com/users/alexsaveliev/repos","events_url":"https://api.github.com/users/alexsaveliev/events{/privacy}","received_events_url":"https://api.github.com/users/alexsaveliev/received_events","type":"User","site_admin":false},"body":"Will it work in non-strict mode on Windows?","created_at":"2016-12-01T09:24:51Z","updated_at":"2016-12-01T09:53:31Z","html_url":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36#discussion_r90408903","pull_request_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/comments/90408903"},"html":{"href":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36#discussion_r90408903"},"pull_request":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36","id":96028724,"html_url":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36","diff_url":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36.diff","patch_url":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36.patch","issue_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/36","number":36,"state":"open","locked":false,"title":"workspace/reference and textDocument/documentSymbol","user":{"login":"beyang","id":1646931,"avatar_url":"https://avatars.githubusercontent.com/u/1646931?v=3","gravatar_id":"","url":"https://api.github.com/users/beyang","html_url":"https://github.com/beyang","followers_url":"https://api.github.com/users/beyang/followers","following_url":"https://api.github.com/users/beyang/following{/other_user}","gists_url":"https://api.github.com/users/beyang/gists{/gist_id}","starred_url":"https://api.github.com/users/beyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beyang/subscriptions","organizations_url":"https://api.github.com/users/beyang/orgs","repos_url":"https://api.github.com/users/beyang/repos","events_url":"https://api.github.com/users/beyang/events{/privacy}","received_events_url":"https://api.github.com/users/beyang/received_events","type":"User","site_admin":false},"body":"Adds `workspace/reference` and `textDocument/documentSymbol` endpoints.","created_at":"2016-12-01T05:31:25Z","updated_at":"2016-12-01T09:53:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"206ea501b7fe2f639f6fe6833438bc233d5c52fa","assignee":{"login":"alexsaveliev","id":7010538,"avatar_url":"https://avatars.githubusercontent.com/u/7010538?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsaveliev","html_url":"https://github.com/alexsaveliev","followers_url":"https://api.github.com/users/alexsaveliev/followers","following_url":"https://api.github.com/users/alexsaveliev/following{/other_user}","gists_url":"https://api.github.com/users/alexsaveliev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsaveliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsaveliev/subscriptions","organizations_url":"https://api.github.com/users/alexsaveliev/orgs","repos_url":"https://api.github.com/users/alexsaveliev/repos","events_url":"https://api.github.com/users/alexsaveliev/events{/privacy}","received_events_url":"https://api.github.com/users/alexsaveliev/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexsaveliev","id":7010538,"avatar_url":"https://avatars.githubusercontent.com/u/7010538?v=3","gravatar_id":"","url":"https://api.github.com/users/alexsaveliev","html_url":"https://github.com/alexsaveliev","followers_url":"https://api.github.com/users/alexsaveliev/followers","following_url":"https://api.github.com/users/alexsaveliev/following{/other_user}","gists_url":"https://api.github.com/users/alexsaveliev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexsaveliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexsaveliev/subscriptions","organizations_url":"https://api.github.com/users/alexsaveliev/orgs","repos_url":"https://api.github.com/users/alexsaveliev/repos","events_url":"https://api.github.com/users/alexsaveliev/events{/privacy}","received_events_url":"https://api.github.com/users/alexsaveliev/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36/commits","review_comments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36/comments","review_comment_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/36/comments","statuses_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/statuses/4743266a6cf67f27315f8f2f02dfa03612c2fad4","head":{"label":"sourcegraph:bl/ws-refs","ref":"bl/ws-refs","sha":"4743266a6cf67f27315f8f2f02dfa03612c2fad4","user":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"repo":{"id":68805662,"name":"javascript-typescript-langserver","full_name":"sourcegraph/javascript-typescript-langserver","owner":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcegraph/javascript-typescript-langserver","description":"JavaScript & TypeScript language server to add JS/TS support to editors and other tools that use the Language Server Protocol (LSP)","fork":false,"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver","forks_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/forks","keys_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/teams","hooks_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/hooks","issue_events_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/events{/number}","events_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/events","assignees_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/assignees{/user}","branches_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/branches{/branch}","tags_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/tags","blobs_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/languages","stargazers_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/stargazers","contributors_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/contributors","subscribers_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/subscribers","subscription_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/subscription","commits_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/contents/{+path}","compare_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/merges","archive_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/downloads","issues_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues{/number}","pulls_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/labels{/name}","releases_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/releases{/id}","deployments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/deployments","created_at":"2016-09-21T10:20:04Z","updated_at":"2016-11-28T13:48:04Z","pushed_at":"2016-12-01T06:52:59Z","git_url":"git://github.com/sourcegraph/javascript-typescript-langserver.git","ssh_url":"git@github.com:sourcegraph/javascript-typescript-langserver.git","clone_url":"https://github.com/sourcegraph/javascript-typescript-langserver.git","svn_url":"https://github.com/sourcegraph/javascript-typescript-langserver","homepage":"https://sourcegraph.com","size":623,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"base":{"label":"sourcegraph:master","ref":"master","sha":"e86f9e02cf0b4730d63c73b458cc17becf7a3753","user":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"repo":{"id":68805662,"name":"javascript-typescript-langserver","full_name":"sourcegraph/javascript-typescript-langserver","owner":{"login":"sourcegraph","id":3979584,"avatar_url":"https://avatars.githubusercontent.com/u/3979584?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcegraph","html_url":"https://github.com/sourcegraph","followers_url":"https://api.github.com/users/sourcegraph/followers","following_url":"https://api.github.com/users/sourcegraph/following{/other_user}","gists_url":"https://api.github.com/users/sourcegraph/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcegraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcegraph/subscriptions","organizations_url":"https://api.github.com/users/sourcegraph/orgs","repos_url":"https://api.github.com/users/sourcegraph/repos","events_url":"https://api.github.com/users/sourcegraph/events{/privacy}","received_events_url":"https://api.github.com/users/sourcegraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcegraph/javascript-typescript-langserver","description":"JavaScript & TypeScript language server to add JS/TS support to editors and other tools that use the Language Server Protocol (LSP)","fork":false,"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver","forks_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/forks","keys_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/teams","hooks_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/hooks","issue_events_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/events{/number}","events_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/events","assignees_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/assignees{/user}","branches_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/branches{/branch}","tags_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/tags","blobs_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/languages","stargazers_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/stargazers","contributors_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/contributors","subscribers_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/subscribers","subscription_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/subscription","commits_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/contents/{+path}","compare_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/merges","archive_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/downloads","issues_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues{/number}","pulls_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/labels{/name}","releases_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/releases{/id}","deployments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/deployments","created_at":"2016-09-21T10:20:04Z","updated_at":"2016-11-28T13:48:04Z","pushed_at":"2016-12-01T06:52:59Z","git_url":"git://github.com/sourcegraph/javascript-typescript-langserver.git","ssh_url":"git@github.com:sourcegraph/javascript-typescript-langserver.git","clone_url":"https://github.com/sourcegraph/javascript-typescript-langserver.git","svn_url":"https://github.com/sourcegraph/javascript-typescript-langserver","homepage":"https://sourcegraph.com","size":623,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36"},"html":{"href":"https://github.com/sourcegraph/javascript-typescript-langserver/pull/36"},"issue":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/36"},"comments":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/statuses/4743266a6cf67f27315f8f2f02dfa03612c2fad4"}}}}
{"actor":{"display_login":"alexsaveliev"}}