# shellcheck shell=dash

# https://github.com/Koihik/LuaFormatter
# https://github.com/JohnnyMorganz/StyLua
# https://github.com/Vurv78/LuaPro

___x_cmd_lua_thirdparty_format(){
    ___x_cmd_lua_thirdparty_format___exec "$@"
}

___x_cmd_lua_thirdparty_format___exec(){
    # ___x_cmd_lua_thirdparty_load_env || return 1

    # ___x_cmd_hascmd lua-format || {
    #     ___x_cmd_lua_thirdparty___install luaformatter || return 1
    # }
    # ___x_cmd_cmds lua-format "$@"

    ___x_cmd_hascmd stylua || {
        ___x_cmd env try stylua || return 1
    }
    ___x_cmd_cmds stylua "$@"
}
