Skip to content
This repository was archived by the owner on Feb 22, 2020. It is now read-only.

Commit 09e9351

Browse files
committed
.
1 parent 54b0358 commit 09e9351

File tree

1 file changed

+2
-30
lines changed

1 file changed

+2
-30
lines changed

src/lang-go.ts

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -814,36 +814,8 @@ export function activate(ctx: sourcegraph.ExtensionContext = DUMMY_CTX): void {
814814
},
815815
}),
816816
documentSelector: [{ language: 'go' }],
817-
clientToServerURI: (uri: URL) => {
818-
return uri
819-
},
820-
// clientToServerURI: (uri: URL) => new URL(`file:///${uri.hash.slice(1)}`),
821-
serverToClientURI: (uri, currentRootURI) => {
822-
if (!currentRootURI) {
823-
return uri
824-
}
825-
826-
if (/^file:\/\/\//.test(uri.href)) {
827-
// The definition is in a file in the same repo
828-
const docURL = new URL(currentRootURI.href)
829-
docURL.hash = uri.href.slice('file:///'.length)
830-
return docURL
831-
}
832-
return uri
833-
},
834-
additionalInitializationOptions: (rootURI: URL) => {
835-
const originalRootURI = rootURI.href
836-
rootURI.hash = ''
837-
return {
838-
// originalRootURI,
839-
// TODO drop zipURL, keep zipURLTemplate (different PR)
840-
zipURL: constructZipURL({
841-
repoName: pathname(rootURI.href).replace(/^\/+/, ''),
842-
revision: rootURI.search.substr(1),
843-
token,
844-
}),
845-
zipURLTemplate: zipURLTemplate(token),
846-
}
817+
initializationOptions: {
818+
zipURLTemplate: zipURLTemplate(token),
847819
},
848820
})
849821
ctx.subscriptions.add(client)

0 commit comments

Comments
 (0)