- Notifications
You must be signed in to change notification settings - Fork 440
/
Copy pathselectors.ts
22 lines (21 loc) · 728 Bytes
/
selectors.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import*asmonacofrom'@theia/monaco-editor-core';
import{OutputUri}from'@theia/output/lib/common/output-uri';
/**
* Exclusive "ino" document selector for monaco.
*/
exportconstInoSelector=selectorOf('ino','c','cpp','h','hpp','pde');
functionselectorOf(
...languageId: string[]
): monaco.languages.LanguageSelector{
returnlanguageId.map((language)=>({
language,
exclusive: true,// <-- this should make sure the custom formatter has higher precedence over the LS formatter.
}));
}
/**
* Selector for the `monaco` resource in the Arduino _Output_ channel.
*/
exportconstArduinoOutputSelector: monaco.languages.LanguageSelector={
scheme: OutputUri.SCHEME,
pattern: '**/Arduino',
};