Shift+Alt+F). To format on every save, turn on editor.formatOnSave in VS Code.

format in .gluarc.json.
Options
.gluarc.json
Style options
The settings panel lists every style option with a description. These are the most common:External formatter
To use another formatter such as StyLua, give its command and arguments. GLuaLS sends the file on standard input and reads the result from standard output.${file} is replaced with the file path.
.gluarc.json