Options used by format when computing the formatting edit operations

interface FormattingOptions {
    eol?: string;
    insertFinalNewline?: boolean;
    insertSpaces?: boolean;
    keepLines?: boolean;
    tabSize?: number;
}

Properties

eol?: string

The default 'end of line' character. If not set, '\n' is used as default.

insertFinalNewline?: boolean

If set, will add a new line at the end of the document.

insertSpaces?: boolean

Is indentation based on spaces?

keepLines?: boolean

If true, will keep line positions as is in the formatting

tabSize?: number

If indentation is based on spaces (insertSpaces = true), the number of spaces that make an indent.