@@ -17,15 +17,11 @@ export async function initializeCache(workspaceFolder: vscode.WorkspaceFolder |
1717 return
1818 }
1919
20- const useIgnoreFiles = vscode . workspace
21- . getConfiguration ( '' , workspaceFolder )
22- . get < boolean > ( 'search.useIgnoreFiles' )
23-
2420 let sgignoreExclude : IgnoreRecord = { }
2521
26- if ( useIgnoreFiles && workspaceFolder ) {
22+ if ( workspaceFolder ) {
2723 sgignoreExclude = await readIgnoreFile (
28- vscode . Uri . joinPath ( workspaceFolder . uri , '.cody ' , 'ignore' )
24+ vscode . Uri . joinPath ( workspaceFolder . uri , '.sourcegraph ' , 'ignore' )
2925 )
3026
3127 setupFileWatcher ( workspaceFolder )
@@ -35,7 +31,7 @@ export async function initializeCache(workspaceFolder: vscode.WorkspaceFolder |
3531}
3632
3733function setupFileWatcher ( workspaceFolder : vscode . WorkspaceFolder ) : void {
38- const filename = '.cody /ignore'
34+ const filename = '.sourcegraph /ignore'
3935 const watcherKey = `${ workspaceFolder . uri . toString ( ) } :${ filename } `
4036 if ( fileWatchers . has ( watcherKey ) ) {
4137 return
@@ -67,16 +63,10 @@ export async function getExcludePattern(
6763) : Promise < string > {
6864 await initializeCache ( workspaceFolder )
6965
70- const config = vscode . workspace . getConfiguration ( '' , workspaceFolder )
71- const filesExclude = config . get < IgnoreRecord > ( 'files.exclude' , { } )
72- const searchExclude = config . get < IgnoreRecord > ( 'search.exclude' , { } )
73-
7466 const cacheKey = getCacheKey ( workspaceFolder )
7567 const cached = excludeCache . get ( cacheKey )
7668 const sgignoreExclude = cached ?? { }
7769 const mergedExclude : IgnoreRecord = {
78- ...filesExclude ,
79- ...searchExclude ,
8070 ...sgignoreExclude ,
8171 }
8272 const excludePatterns = Object . keys ( mergedExclude ) . filter ( key => mergedExclude [ key ] === true )
0 commit comments