Skip to content

Commit b0c1857

Browse files
authored
feat: enable code search and add sponsor Sourcegraph (#211)
1 parent a274e92 commit b0c1857

File tree

5 files changed

+85
-13
lines changed

5 files changed

+85
-13
lines changed

Diff for: README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ $ yarn build
105105

106106
The continued development and maintenance of GitHub1s is made possible by these generous sponsors:
107107

108-
<br />
109-
<a href="https://vercel.com/?utm_source=vscode-github1s&utm_campaign=oss">
110-
<img src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vercel-logo.svg">
111-
</a>
112-
<br /><br />
108+
<table><tbody><tr>
109+
<td><a href="https://vercel.com/?utm_source=vscode-github1s&utm_campaign=oss">
110+
<img height="40px" src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/sourcegraph-logo.svg">
111+
</a></td>
112+
<td><a href="https://vercel.com/?utm_source=vscode-github1s&utm_campaign=oss">
113+
<img height="40px" src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vercel-logo.svg">
114+
</a></td>
115+
</tr></tbody></table>
113116

114117
## Third-party Related Projects
115118

Diff for: extensions/github1s/src/extension.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
import {
1818
GitHub1sFileSystemProvider,
1919
GitHub1sFileSearchProvider,
20-
// GitHub1sTextSearchProvider,
20+
GitHub1sTextSearchProvider,
2121
GitHub1sSubmoduleDecorationProvider,
2222
} from '@/providers';
2323
import { showSponsors } from '@/sponsors';
@@ -40,13 +40,10 @@ export function activate(context: vscode.ExtensionContext) {
4040
GitHub1sFileSearchProvider.scheme,
4141
new GitHub1sFileSearchProvider(fsProvider)
4242
),
43-
// TODO: The Code Search ability is powered by Sourcegraph
44-
// We are actively in touch with the Sourcegraph Team
45-
// It will be enabled if we get their permission
46-
// vscode.workspace.registerTextSearchProvider(
47-
// GitHub1sTextSearchProvider.scheme,
48-
// new GitHub1sTextSearchProvider()
49-
// ),
43+
vscode.workspace.registerTextSearchProvider(
44+
GitHub1sTextSearchProvider.scheme,
45+
new GitHub1sTextSearchProvider()
46+
),
5047
vscode.window.registerFileDecorationProvider(
5148
new GitHub1sSubmoduleDecorationProvider(fsProvider)
5249
)

Diff for: extensions/github1s/src/sponsors.ts

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ const sponsors = [
1111
link: 'https://vercel.com/?utm_source=vscode-github1s&utm_campaign=oss',
1212
description: 'Develop. Preview. Ship.',
1313
},
14+
{
15+
name: 'Sourcegraph',
16+
link: 'https://sourcegraph.com',
17+
description: 'Universal code search',
18+
},
1419
];
1520

1621
export const showSponsors = () => {

Diff for: resources/images/sourcegraph-logo.svg

+66
Loading

Diff for: src/vs/workbench/contrib/url/browser/trustedDomains.ts

+1
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ const github1sDefaultTrustedDomains = [
306306
'*.microsoft.com',
307307
'*.github1s.com',
308308
'*.vercel.com',
309+
'*.sourcegraph.com',
309310
];
310311

311312
export function readStaticTrustedDomains(

0 commit comments

Comments
 (0)