Commit 958ebdd 1 parent 9ac1af4 commit 958ebdd Copy full SHA for 958ebdd
File tree 3 files changed +13
-21
lines changed
3 files changed +13
-21
lines changed Original file line number Diff line number Diff line change @@ -7477,6 +7477,19 @@ declare module 'vscode' {
7477
7477
*/
7478
7478
export function getLanguages ( ) : Thenable < string [ ] > ;
7479
7479
7480
+ /**
7481
+ * Set (and change) the [language](#TextDocument.languageId) that is associated
7482
+ * with the given document.
7483
+ *
7484
+ * *Note* that calling this function will trigger the [`onDidCloseTextDocument`](#workspace.onDidCloseTextDocument) event
7485
+ * followed by the [`onDidOpenTextDocument`](#workspace.onDidOpenTextDocument) event.
7486
+ *
7487
+ * @param document The document which language is to be changed
7488
+ * @param languageId The new language identifier.
7489
+ * @returns A thenable that resolves with the updated document.
7490
+ */
7491
+ export function setTextDocumentLanguage ( document : TextDocument , languageId : string ) : Thenable < TextDocument > ;
7492
+
7480
7493
/**
7481
7494
* Compute the match between a document [selector](#DocumentSelector) and a document. Values
7482
7495
* greater than zero mean the selector matches the document.
Original file line number Diff line number Diff line change @@ -11,26 +11,6 @@ declare module 'vscode' {
11
11
export function sampleFunction ( ) : Thenable < any > ;
12
12
}
13
13
14
- //#region Joh - https://github.com/Microsoft/vscode/issues/1800
15
-
16
- export namespace languages {
17
-
18
- /**
19
- * Set (and change) the [language](#TextDocument.languageId) that is associated
20
- * with the given document.
21
- *
22
- * *Note* that calling this function will trigger the [`onDidCloseTextDocument`](#languages.onDidCloseTextDocument) event
23
- * followed by the [`onDidOpenTextDocument`](#languages.onDidOpenTextDocument) event.
24
- *
25
- * @param document The document which language is to be changed
26
- * @param languageId The new language identifier.
27
- * @returns A thenable that resolves with the updated document.
28
- */
29
- export function setTextDocumentLanguage ( document : TextDocument , languageId : string ) : Thenable < TextDocument > ;
30
- }
31
-
32
- //#endregion
33
-
34
14
//#region Joh - read/write in chunks
35
15
36
16
export interface FileSystemProvider {
Original file line number Diff line number Diff line change @@ -270,7 +270,6 @@ export function createApiFactory(
270
270
return extHostLanguages . getLanguages ( ) ;
271
271
} ,
272
272
setTextDocumentLanguage ( document : vscode . TextDocument , languageId : string ) : Thenable < vscode . TextDocument > {
273
- checkProposedApiEnabled ( extension ) ;
274
273
return extHostLanguages . changeLanguage ( document . uri , languageId ) ;
275
274
} ,
276
275
match ( selector : vscode . DocumentSelector , document : vscode . TextDocument ) : number {
You can’t perform that action at this time.
0 commit comments