@codingame/monaco-vscode-configuration-service-override 11.1.2 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +29 -2
- package/index.js +138 -1
- package/package.json +27 -8
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.d.ts +26 -0
- package/vscode/src/vs/editor/common/services/textResourceConfigurationService.js +13 -11
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/configurationExtensionPoint.js +82 -79
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js +31 -32
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.d.ts +130 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configuration.js +18 -16
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.d.ts +144 -0
- package/vscode/src/vs/workbench/services/configuration/browser/configurationService.js +182 -186
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.d.ts +16 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationCache.js +3 -1
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.d.ts +86 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationEditing.js +219 -194
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.d.ts +43 -0
- package/vscode/src/vs/workbench/services/configuration/common/configurationModels.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.d.ts +37 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +30 -26
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.d.ts +13 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +3 -1
- package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.d.ts +16 -0
- package/vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js +8 -5
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.d.ts +64 -0
- package/vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js +54 -53
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.d.ts +39 -0
- package/vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js +15 -11
- package/configuration.js +0 -138
- package/tools.js +0 -44
package/index.d.ts
CHANGED
|
@@ -1,2 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { IDisposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
3
|
+
import type { IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
4
|
+
import { ConfigurationScope, type IConfigurationDefaults, type IConfigurationNode, type IConfigurationRegistry } from "vscode/vscode/vs/platform/configuration/common/configurationRegistry";
|
|
5
|
+
import type { IFileWriteOptions } from "vscode/vscode/vs/platform/files/common/files";
|
|
6
|
+
import type { IAnyWorkspaceIdentifier, IEmptyWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IWorkspaceIdentifier } from "vscode/vscode/vs/platform/workspace/common/workspace";
|
|
7
|
+
import type { IStoredWorkspace, IWorkspaceFolderCreationData } from "@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/platform/workspaces/common/workspaces";
|
|
8
|
+
import type { IColorCustomizations, IThemeScopedColorCustomizations } from "@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common/vscode/vs/workbench/services/themes/common/workbenchThemeService";
|
|
9
|
+
declare const defaultUserConfigurationFile: URI;
|
|
10
|
+
/**
|
|
11
|
+
* Should be called only BEFORE the service are initialized to initialize the file on the filesystem before the configuration service initializes
|
|
12
|
+
*/
|
|
13
|
+
declare function initUserConfiguration(configurationJson: string, options?: Partial<IFileWriteOptions>, file?: URI): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Can be called at any time after the services are initialized to update the user configuration
|
|
16
|
+
*/
|
|
17
|
+
declare function updateUserConfiguration(configurationJson: string): Promise<void>;
|
|
18
|
+
declare function getUserConfiguration(): Promise<string>;
|
|
19
|
+
declare function onUserConfigurationChange(callback: () => void): IDisposable;
|
|
20
|
+
declare const configurationRegistry: IConfigurationRegistry;
|
|
21
|
+
export declare function reinitializeWorkspace(workspace: IAnyWorkspaceIdentifier): Promise<void>;
|
|
22
|
+
declare function getServiceOverride(): IEditorOverrideServices;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Provide workspace via the services `initialize` function `configuration.workspaceProvider` parameter
|
|
25
|
+
*/
|
|
26
|
+
declare function getServiceOverride(defaultWorkspace?: URI | IAnyWorkspaceIdentifier): IEditorOverrideServices;
|
|
27
|
+
export default getServiceOverride;
|
|
28
|
+
export { ConfigurationScope, configurationRegistry, defaultUserConfigurationFile, getUserConfiguration, initUserConfiguration, onUserConfigurationChange, updateUserConfiguration };
|
|
29
|
+
export type { IAnyWorkspaceIdentifier, IColorCustomizations, IConfigurationDefaults, IConfigurationNode, IEmptyWorkspaceIdentifier, ISingleFolderWorkspaceIdentifier, IStoredWorkspace, IThemeScopedColorCustomizations, IWorkspaceFolderCreationData, IWorkspaceIdentifier };
|
package/index.js
CHANGED
|
@@ -1,2 +1,139 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
3
|
+
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
4
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
5
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
|
+
import { generateUuid } from 'vscode/vscode/vs/base/common/uuid';
|
|
7
|
+
import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'vscode/vscode/vs/editor/common/services/textResourceConfiguration';
|
|
8
|
+
import { TextResourceConfigurationService } from './vscode/src/vs/editor/common/services/textResourceConfigurationService.js';
|
|
9
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
|
+
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
2
11
|
export { ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
12
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
13
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
14
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
16
|
+
import { IPolicyService } from 'vscode/vscode/vs/platform/policy/common/policy.service';
|
|
17
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
18
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
19
|
+
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
20
|
+
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
21
|
+
import { IWorkspacesService } from 'vscode/vscode/vs/platform/workspaces/common/workspaces.service';
|
|
22
|
+
import './vscode/src/vs/workbench/api/common/configurationExtensionPoint.js';
|
|
23
|
+
import './vscode/src/vs/workbench/contrib/workspaces/browser/workspaces.contribution.js';
|
|
24
|
+
import { WorkspaceService } from './vscode/src/vs/workbench/services/configuration/browser/configurationService.js';
|
|
25
|
+
import { ConfigurationCache } from './vscode/src/vs/workbench/services/configuration/common/configurationCache.js';
|
|
26
|
+
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
27
|
+
import { IRemoteAgentService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteAgentService.service';
|
|
28
|
+
import { TextResourcePropertiesService } from './vscode/src/vs/workbench/services/textresourceProperties/common/textResourcePropertiesService.js';
|
|
29
|
+
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
30
|
+
import { AbstractWorkspaceEditingService } from './vscode/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.js';
|
|
31
|
+
import { BrowserWorkspacesService } from './vscode/src/vs/workbench/services/workspaces/browser/workspacesService.js';
|
|
32
|
+
import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
|
|
33
|
+
import { ConfigurationResolverService } from './vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js';
|
|
34
|
+
import { IConfigurationResolverService } from 'vscode/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service';
|
|
35
|
+
import getServiceOverride$1, { initFile } from '@codingame/monaco-vscode-files-service-override';
|
|
36
|
+
import { registerServiceInitializePreParticipant } from 'vscode/lifecycle';
|
|
37
|
+
import { getService, withReadyServices } from 'vscode/services';
|
|
38
|
+
import { unsupported, memoizedConstructor } from 'vscode/tools';
|
|
39
|
+
import { getWorkspaceIdentifier } from 'vscode/workbench';
|
|
40
|
+
|
|
41
|
+
const defaultUserConfigurationFile = URI.from({
|
|
42
|
+
scheme: Schemas.vscodeUserData,
|
|
43
|
+
path: '/User/settings.json'
|
|
44
|
+
});
|
|
45
|
+
async function initUserConfiguration(configurationJson, options, file = defaultUserConfigurationFile) {
|
|
46
|
+
await initFile(file, configurationJson, options);
|
|
47
|
+
}
|
|
48
|
+
async function updateUserConfiguration(configurationJson) {
|
|
49
|
+
const userDataProfilesService = await getService(IUserDataProfilesService);
|
|
50
|
+
const fileService = await getService(IFileService);
|
|
51
|
+
await fileService.writeFile(userDataProfilesService.defaultProfile.settingsResource, VSBuffer.fromString(configurationJson));
|
|
52
|
+
}
|
|
53
|
+
async function getUserConfiguration() {
|
|
54
|
+
const userDataProfilesService = await getService(IUserDataProfilesService);
|
|
55
|
+
const fileService = await getService(IFileService);
|
|
56
|
+
return (await fileService.readFile(userDataProfilesService.defaultProfile.settingsResource)).value.toString();
|
|
57
|
+
}
|
|
58
|
+
function onUserConfigurationChange(callback) {
|
|
59
|
+
return withReadyServices((accessor) => {
|
|
60
|
+
const userDataProfilesService = accessor.get(IUserDataProfilesService);
|
|
61
|
+
return accessor.get(IFileService).onDidFilesChange((e) => {
|
|
62
|
+
if (e.affects(userDataProfilesService.defaultProfile.settingsResource)) {
|
|
63
|
+
callback();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const configurationRegistry = Registry.as(Extensions.Configuration);
|
|
69
|
+
let InjectedConfigurationService = class InjectedConfigurationService extends WorkspaceService {
|
|
70
|
+
constructor(workbenchEnvironmentService, userDataProfileService, userDataProfilesService, fileService, remoteAgentService, uriIdentityService, logService, policyService) {
|
|
71
|
+
const configurationCache = new ConfigurationCache([Schemas.file, Schemas.vscodeUserData, Schemas.tmp], workbenchEnvironmentService, fileService);
|
|
72
|
+
super({ configurationCache }, workbenchEnvironmentService, userDataProfileService, userDataProfilesService, fileService, remoteAgentService, uriIdentityService, logService, policyService);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
InjectedConfigurationService = __decorate([
|
|
76
|
+
__param(0, IWorkbenchEnvironmentService),
|
|
77
|
+
__param(1, IUserDataProfileService),
|
|
78
|
+
__param(2, IUserDataProfilesService),
|
|
79
|
+
__param(3, IFileService),
|
|
80
|
+
__param(4, IRemoteAgentService),
|
|
81
|
+
__param(5, IUriIdentityService),
|
|
82
|
+
__param(6, ILogService),
|
|
83
|
+
__param(7, IPolicyService)
|
|
84
|
+
], InjectedConfigurationService);
|
|
85
|
+
class MonacoWorkspaceEditingService extends AbstractWorkspaceEditingService {
|
|
86
|
+
constructor() {
|
|
87
|
+
super(...arguments);
|
|
88
|
+
this.enterWorkspace = unsupported;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
let _defaultWorkspace;
|
|
92
|
+
registerServiceInitializePreParticipant(async (accessor) => {
|
|
93
|
+
const workspaceService = accessor.get(IWorkspaceContextService);
|
|
94
|
+
workspaceService.acquireInstantiationService(accessor.get(IInstantiationService));
|
|
95
|
+
const workspace = _defaultWorkspace ?? getWorkspaceIdentifier();
|
|
96
|
+
if (URI.isUri(workspace)) {
|
|
97
|
+
const configPath = workspace.with({ path: '/workspace.code-workspace' });
|
|
98
|
+
try {
|
|
99
|
+
const fileService = accessor.get(IFileService);
|
|
100
|
+
await fileService.createFolder(workspace);
|
|
101
|
+
await fileService.writeFile(configPath, VSBuffer.fromString(JSON.stringify({
|
|
102
|
+
folders: [
|
|
103
|
+
{
|
|
104
|
+
path: workspace.path
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
})));
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
}
|
|
111
|
+
await workspaceService.initialize({
|
|
112
|
+
id: generateUuid(),
|
|
113
|
+
configPath
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
await workspaceService.initialize(workspace);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const MemoizedInjectedConfigurationService = memoizedConstructor(InjectedConfigurationService);
|
|
121
|
+
async function reinitializeWorkspace(workspace) {
|
|
122
|
+
const workspaceService = (await getService(IWorkspaceContextService));
|
|
123
|
+
await workspaceService.initialize(workspace);
|
|
124
|
+
}
|
|
125
|
+
function getServiceOverride(defaultWorkspace) {
|
|
126
|
+
_defaultWorkspace = defaultWorkspace;
|
|
127
|
+
return {
|
|
128
|
+
...getServiceOverride$1(),
|
|
129
|
+
[IConfigurationService.toString()]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
|
|
130
|
+
[IWorkspaceContextService.toString()]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
|
|
131
|
+
[ITextResourceConfigurationService.toString()]: new SyncDescriptor(TextResourceConfigurationService, [], true),
|
|
132
|
+
[IWorkspaceEditingService.toString()]: new SyncDescriptor(MonacoWorkspaceEditingService, [], true),
|
|
133
|
+
[IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, [], true),
|
|
134
|
+
[ITextResourcePropertiesService.toString()]: new SyncDescriptor(TextResourcePropertiesService, [], true),
|
|
135
|
+
[IConfigurationResolverService.toString()]: new SyncDescriptor(ConfigurationResolverService, [], true)
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export { configurationRegistry, getServiceOverride as default, defaultUserConfigurationFile, getUserConfiguration, initUserConfiguration, onUserConfigurationChange, reinitializeWorkspace, updateUserConfiguration };
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-configuration-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - configuration service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,24 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@codingame/monaco-vscode-37e80bf5-92f5-5e4c-8b6d-98e0bb89dbef-common": "12.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-422642f2-7e3a-5c1c-9e1e-1d3ef1817346-common": "12.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common": "12.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-cc9ccbec-e2a1-599d-84ae-46f5efc666e3-common": "12.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common": "12.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-d987325e-3e05-53aa-b9ff-6f97476f64db-common": "12.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-files-service-override": "12.0.1",
|
|
25
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.1"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": "12.0.1"
|
|
29
|
+
},
|
|
30
|
+
"peerDependenciesMeta": {
|
|
31
|
+
"@codingame/monaco-vscode-9d0168a3-519b-57f3-9bcc-89efc41f951a-common": {
|
|
32
|
+
"optional": true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
17
35
|
"main": "index.js",
|
|
18
36
|
"module": "index.js",
|
|
19
37
|
"types": "index.d.ts",
|
|
@@ -22,11 +40,12 @@
|
|
|
22
40
|
"default": "./index.js"
|
|
23
41
|
},
|
|
24
42
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
43
|
+
"default": "./vscode/src/*.js",
|
|
44
|
+
"types": "./vscode/src/*.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./*": {
|
|
47
|
+
"default": "./*.js",
|
|
48
|
+
"types": "./*.d.ts"
|
|
26
49
|
}
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.2",
|
|
30
|
-
"@codingame/monaco-vscode-files-service-override": "11.1.2"
|
|
31
50
|
}
|
|
32
51
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { IPosition } from "vscode/vscode/vs/editor/common/core/position";
|
|
5
|
+
import { ILanguageService } from "vscode/vscode/vs/editor/common/languages/language";
|
|
6
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
7
|
+
import { ITextResourceConfigurationService, ITextResourceConfigurationChangeEvent } from "vscode/vscode/vs/editor/common/services/textResourceConfiguration";
|
|
8
|
+
import { ConfigurationTarget, IConfigurationValue } from "vscode/vscode/vs/platform/configuration/common/configuration";
|
|
9
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
10
|
+
export declare class TextResourceConfigurationService extends Disposable implements ITextResourceConfigurationService {
|
|
11
|
+
private readonly configurationService;
|
|
12
|
+
private readonly modelService;
|
|
13
|
+
private readonly languageService;
|
|
14
|
+
_serviceBrand: undefined;
|
|
15
|
+
private readonly _onDidChangeConfiguration;
|
|
16
|
+
readonly onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent>;
|
|
17
|
+
constructor(configurationService: IConfigurationService, modelService: IModelService, languageService: ILanguageService);
|
|
18
|
+
getValue<T>(resource: URI | undefined, section?: string): T;
|
|
19
|
+
getValue<T>(resource: URI | undefined, at?: IPosition, section?: string): T;
|
|
20
|
+
updateValue(resource: URI, key: string, value: any, configurationTarget?: ConfigurationTarget): Promise<void>;
|
|
21
|
+
private deriveConfigurationTarget;
|
|
22
|
+
private _getValue;
|
|
23
|
+
inspect<T>(resource: URI | undefined, position: IPosition | null, section: string): IConfigurationValue<Readonly<T>>;
|
|
24
|
+
private getLanguage;
|
|
25
|
+
private toResourceConfigurationChangeEvent;
|
|
26
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { Position } from 'vscode/vscode/vs/editor/common/core/position';
|
|
5
6
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
6
7
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
8
|
+
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
7
9
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
10
|
|
|
9
11
|
let TextResourceConfigurationService = class TextResourceConfigurationService extends Disposable {
|
|
@@ -34,34 +36,34 @@ let TextResourceConfigurationService = class TextResourceConfigurationService ex
|
|
|
34
36
|
deriveConfigurationTarget(configurationValue, language) {
|
|
35
37
|
if (language) {
|
|
36
38
|
if (configurationValue.memory?.override !== undefined) {
|
|
37
|
-
return
|
|
39
|
+
return ConfigurationTarget.MEMORY;
|
|
38
40
|
}
|
|
39
41
|
if (configurationValue.workspaceFolder?.override !== undefined) {
|
|
40
|
-
return
|
|
42
|
+
return ConfigurationTarget.WORKSPACE_FOLDER;
|
|
41
43
|
}
|
|
42
44
|
if (configurationValue.workspace?.override !== undefined) {
|
|
43
|
-
return
|
|
45
|
+
return ConfigurationTarget.WORKSPACE;
|
|
44
46
|
}
|
|
45
47
|
if (configurationValue.userRemote?.override !== undefined) {
|
|
46
|
-
return
|
|
48
|
+
return ConfigurationTarget.USER_REMOTE;
|
|
47
49
|
}
|
|
48
50
|
if (configurationValue.userLocal?.override !== undefined) {
|
|
49
|
-
return
|
|
51
|
+
return ConfigurationTarget.USER_LOCAL;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
if (configurationValue.memory?.value !== undefined) {
|
|
53
|
-
return
|
|
55
|
+
return ConfigurationTarget.MEMORY;
|
|
54
56
|
}
|
|
55
57
|
if (configurationValue.workspaceFolder?.value !== undefined) {
|
|
56
|
-
return
|
|
58
|
+
return ConfigurationTarget.WORKSPACE_FOLDER;
|
|
57
59
|
}
|
|
58
60
|
if (configurationValue.workspace?.value !== undefined) {
|
|
59
|
-
return
|
|
61
|
+
return ConfigurationTarget.WORKSPACE;
|
|
60
62
|
}
|
|
61
63
|
if (configurationValue.userRemote?.value !== undefined) {
|
|
62
|
-
return
|
|
64
|
+
return ConfigurationTarget.USER_REMOTE;
|
|
63
65
|
}
|
|
64
|
-
return
|
|
66
|
+
return ConfigurationTarget.USER_LOCAL;
|
|
65
67
|
}
|
|
66
68
|
_getValue(resource, position, section) {
|
|
67
69
|
const language = resource ? this.getLanguage(resource, position) : undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|