read rust naming guideline: mostly clear recommendation for any data type with agreed standard
reed
#luau naming guides: first guide - use camelCase for functions; second guide: use only PascalCase for everything; third guide, for lua not luau specifically: use snake_case for functions;
#lua language server: functions should be in PascalCase; luau-lsp doesnt care
how do you name things in lua(u)? files, functions and return tables types? for example:
file myPlugin.luau:
local MAX_USERS_COUNT = 100
local function doSomething(phone_number: string, finger_count: number): number
print(phone_number)
local result: number = finger_count * MAX_USER_COUNT
return result
end
return {
DoSomething = doSomething,
}
how do you usually name things here? i would use camelCase for local vars, functions and file names, LOUD_SNAKE_CASE for constants, and PascalCase for return tables fields, after reading some guides
also, how many spaces for indentations? i usually use four for python and rust, but maybe lua(u) has different conventions?
#programming