| b69ab31 | | | 1 | /** |
| b69ab31 | | | 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| b69ab31 | | | 3 | * |
| b69ab31 | | | 4 | * This source code is licensed under the MIT license found in the |
| b69ab31 | | | 5 | * LICENSE file in the root directory of this source tree. |
| b69ab31 | | | 6 | */ |
| b69ab31 | | | 7 | |
| b69ab31 | | | 8 | export type TextMateGrammar = { |
| b69ab31 | | | 9 | type: 'json' | 'plist'; |
| b69ab31 | | | 10 | /** |
| b69ab31 | | | 11 | * Grammar data as a string because parseRawGrammar() in vscode-textmate |
| b69ab31 | | | 12 | * takes the contents as a string, even if the type is json. |
| b69ab31 | | | 13 | */ |
| b69ab31 | | | 14 | grammar: string; |
| b69ab31 | | | 15 | }; |
| b69ab31 | | | 16 | |
| b69ab31 | | | 17 | export type Grammar = { |
| b69ab31 | | | 18 | language?: string; |
| b69ab31 | | | 19 | injections: Array<string>; |
| b69ab31 | | | 20 | embeddedLanguages?: {[scopeName: string]: string}; |
| b69ab31 | | | 21 | fileName: string; |
| b69ab31 | | | 22 | fileFormat: 'json' | 'plist'; |
| b69ab31 | | | 23 | }; |
| b69ab31 | | | 24 | |
| b69ab31 | | | 25 | export type LanguageConfiguration = { |
| b69ab31 | | | 26 | id: string; |
| b69ab31 | | | 27 | extensions?: string[]; |
| b69ab31 | | | 28 | filenames?: string[]; |
| b69ab31 | | | 29 | filenamePatterns?: string[]; |
| b69ab31 | | | 30 | firstLine?: string; |
| b69ab31 | | | 31 | aliases?: string[]; |
| b69ab31 | | | 32 | mimetypes?: string[]; |
| b69ab31 | | | 33 | }; |