Skip to content

Commit 155546f

Browse files
authored
feat: add initialization configuration options for file indexing (#436)
* Add configuration options for file indexing during initialization * fix formatting issues * refactor: update configuration to make it more flexible
1 parent 8b8a9fa commit 155546f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

runtimes/protocol/lsp.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,31 @@ export class AutoParameterStructuresProtocolRequestType<P, R, PR, E, RO>
4747
}
4848
}
4949

50+
/**
51+
* Configuration options for file indexing in local project context.
52+
* Controls what files are indexed.
53+
*/
54+
export interface WorkspaceIndexConfiguration {
55+
/**
56+
* Array of file patterns to be be excluded from indexing. Patterns must follow the git ignore convention.
57+
*/
58+
ignoreFilePatterns?: string[]
59+
60+
/**
61+
* List of file extensions that should be included.
62+
* Example: ['.ts', '.js', '.json']
63+
* Files with extensions not in this list will be ignored.
64+
*/
65+
fileExtensions?: string[]
66+
}
67+
68+
/**
69+
* Represents the global context configuration settings.
70+
*/
71+
export interface ContextConfiguration {
72+
workspaceIndexConfiguration?: WorkspaceIndexConfiguration
73+
}
74+
5075
/**
5176
* Extended Client information, passed from client extension to server at initialization.
5277
* Use to pass additional information about Client Extension, which connects to Language Server,
@@ -117,6 +142,10 @@ export interface AWSInitializationOptions {
117142
showSaveFileDialog?: boolean
118143
}
119144
}
145+
/**
146+
* Represents the global context configuration settings.
147+
*/
148+
contextConfiguration?: WorkspaceIndexConfiguration
120149
/**
121150
* Global region configuration option set by the client application.
122151
* Server implementations can use this value to preconfigure SDKs, API clients, etc. at server process startup.

0 commit comments

Comments
 (0)