kotlin.contribution.ts 773 B

123456789101112131415161718
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. 'use strict';
  6. import { registerLanguage } from '../_.contribution';
  7. // Allow for running under nodejs/requirejs in tests
  8. const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
  9. registerLanguage({
  10. id: 'kotlin',
  11. extensions: ['.kt'],
  12. aliases: ['Kotlin', 'kotlin'],
  13. mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'],
  14. loader: () => _monaco.Promise.wrap(import('./kotlin'))
  15. });