Skip to content

Conversation

@iced-wav
Copy link
Contributor

Allows overriding pushIndent / popIndent to change indention style in plugins. It's useful for projects that auto-formats processed files (it seems MapleStory Worlds does this).

import * as tstl from "typescript-to-lua";

export class Printer extends tstl.LuaPrinter {
    pushIndent() {
        this.currentIndent += `\t`;
    }

    popIndent() {
        this.currentIndent = this.currentIndent.slice(1);
    }
}

Allows overriding `pushIndent` / `popIndent` to change indention style in plugins
@Perryvw Perryvw merged commit 6fb39b6 into TypeScriptToLua:master Feb 16, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants