51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
const configStore = new Map();
|
|
|
|
const config = {
|
|
get: (key, fallback) => configStore.has(key) ? configStore.get(key) : fallback,
|
|
update: async (key, value) => {
|
|
configStore.set(key, value);
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
workspace: {
|
|
workspaceFolders: [],
|
|
getConfiguration: () => config,
|
|
fs: {
|
|
writeFile: async () => {},
|
|
delete: async () => {}
|
|
}
|
|
},
|
|
window: {
|
|
createOutputChannel: () => ({
|
|
appendLine: () => {},
|
|
show: () => {},
|
|
dispose: () => {}
|
|
}),
|
|
createStatusBarItem: () => ({
|
|
text: '',
|
|
tooltip: '',
|
|
command: '',
|
|
backgroundColor: undefined,
|
|
show: () => {},
|
|
hide: () => {},
|
|
dispose: () => {}
|
|
}),
|
|
showInformationMessage: async () => undefined,
|
|
showWarningMessage: async () => undefined,
|
|
showErrorMessage: async () => undefined
|
|
},
|
|
StatusBarAlignment: { Right: 2 },
|
|
ThemeColor: class ThemeColor {
|
|
constructor(id) {
|
|
this.id = id;
|
|
}
|
|
},
|
|
Uri: {
|
|
file: (fsPath) => ({ fsPath, scheme: 'file' }),
|
|
joinPath: (base, ...parts) => ({ fsPath: [base.fsPath, ...parts].join('/') })
|
|
},
|
|
ProgressLocation: { Notification: 15 },
|
|
ConfigurationTarget: { Global: 1, Workspace: 2 }
|
|
};
|