Koihik / LuaFormatter

Code formatter for Lua
Apache License 2.0
708 stars 86 forks source link

Formatting issues with LuaFormatter in CfxLua environment #294

Open damag-dev opened 5 months ago

damag-dev commented 5 months ago

Hey I'm encountering two major formatting errors while using LuaFormatter in the CfxLua environment:

  1. Tildes are being removed. The tildes are removed during formatting, resulting in transformation them into variable. `prop_name` -> prop_name

  2. Safe Navigation operators are being removed. The safe navigation operators (?) are being removed during formatting, altering the code's functionality. User?.Weapon?.Ammo -> User.Weapon.Ammo

If you want to find more info about usage of this 2 look here CFXLua README Search for:

  1. Compile Time Jenkins' Hashes
  2. Safe Navigation