1
0
mirror of https://github.com/arduino/arduino-ide.git synced 2025-05-02 19:18:42 +00:00
Akos Kitta 5226636fed Link compiler errors to editor.
Closes 

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2022-08-15 16:55:17 +02:00

23 lines
728 B
TypeScript

import * as monaco from '@theia/monaco-editor-core';
import { OutputUri } from '@theia/output/lib/common/output-uri';
/**
* Exclusive "ino" document selector for monaco.
*/
export const InoSelector = selectorOf('ino', 'c', 'cpp', 'h', 'hpp', 'pde');
function selectorOf(
...languageId: string[]
): monaco.languages.LanguageSelector {
return languageId.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.
*/
export const ArduinoOutputSelector: monaco.languages.LanguageSelector = {
scheme: OutputUri.SCHEME,
pattern: '**/Arduino',
};