mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-11 14:46:35 +00:00

- Bumped `clangd` to `14.0.0`, - Can use `.clang-format` from: - current sketch folder, - `~/.arduinoIDE/.clang-format`, - `directories#data/.clang-format`, or - falls back to default formatter styles. Closes #1009 Closes #566 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
24 lines
487 B
TypeScript
24 lines
487 B
TypeScript
export const FormatterPath = '/services/formatter';
|
|
export const Formatter = Symbol('Formatter');
|
|
export interface Formatter {
|
|
format({
|
|
content,
|
|
formatterConfigFolderUris,
|
|
options,
|
|
}: {
|
|
content: string;
|
|
formatterConfigFolderUris: string[];
|
|
options?: FormatterOptions;
|
|
}): Promise<string>;
|
|
}
|
|
export interface FormatterOptions {
|
|
/**
|
|
* Size of a tab in spaces.
|
|
*/
|
|
tabSize: number;
|
|
/**
|
|
* Prefer spaces over tabs.
|
|
*/
|
|
insertSpaces: boolean;
|
|
}
|