Skip to content

Commit b7d1c74

Browse files
Create ConfigService.ts
- Add new config service for accessing extension config properties
1 parent b262954 commit b7d1c74

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/services/ConfigService.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import * as vscode from 'vscode';
2+
3+
export default class ConfigService {
4+
5+
/**
6+
* The extension configuration object
7+
*/
8+
static config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('ee');
9+
10+
/**
11+
* Check if user has suggestions enabled
12+
*
13+
* @return boolean
14+
*/
15+
public static suggestionsEnabled(): boolean {
16+
return ConfigService.config.get('suggestCompletions', true);
17+
}
18+
}

0 commit comments

Comments
 (0)