/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IConfigurationService, IConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export const CONFIG_DEFAULT_NAME = 'settings'; export const WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME = '.vscode'; export const WORKSPACE_CONFIG_DEFAULT_PATH = `${WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME}/${CONFIG_DEFAULT_NAME}.json`; export const IWorkspaceConfigurationService = createDecorator('configurationService'); export interface IWorkspaceConfigurationService extends IConfigurationService { /** * Returns iff the workspace has configuration or not. */ hasWorkspaceConfiguration(): boolean; /** * Override for the IConfigurationService#lookup() method that adds information about workspace settings. */ lookup(key: string): IWorkspaceConfigurationValue; /** * Override for the IConfigurationService#keys() method that adds information about workspace settings. */ keys(): IWorkspaceConfigurationKeys; } export interface IWorkspaceConfigurationValue extends IConfigurationValue { workspace: T; } export interface IWorkspaceConfigurationKeys extends IConfigurationKeys { workspace: string[]; } export const WORKSPACE_STANDALONE_CONFIGURATIONS = { 'tasks': `${WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME}/tasks.json`, 'launch': `${WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME}/launch.json`, 'extensions': `${WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME}/extensions.json` };