Skip to content

Commit

Permalink
implement TOML
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistonight committed Dec 17, 2024
1 parent a4b088e commit f7beb75
Show file tree
Hide file tree
Showing 5 changed files with 1,614 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/basic-languages/monaco.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import './st/st.contribution';
import './swift/swift.contribution';
import './systemverilog/systemverilog.contribution';
import './tcl/tcl.contribution';
import './toml/toml.contribution';
import './twig/twig.contribution';
import './typescript/typescript.contribution';
import './typespec/typespec.contribution';
Expand Down
25 changes: 25 additions & 0 deletions src/basic-languages/toml/toml.contribution.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { registerLanguage } from '../_.contribution';

declare var AMD: any;
declare var require: any;

registerLanguage({
id: 'toml',
extensions: ['.toml'],
aliases: ['TOML', 'toml'],
mimetypes: ['application/toml', 'text/toml'],
loader: () => {
if (AMD) {
return new Promise((resolve, reject) => {
require(['vs/basic-languages/toml/toml'], resolve, reject);
});
} else {
return import('./toml');
}
}
});
Loading

0 comments on commit f7beb75

Please sign in to comment.