BryanChi / BryanChi-FX-Devices

6 stars 3 forks source link

Refactor: move fxBlackList, custom Colors to modules. Move AttachImgsAndFonts outside of for loop. Create .luarc #27

Closed AntoineBalaine closed 10 months ago

AntoineBalaine commented 10 months ago

Hello Bryan, how are things? I'm finally getting around to doing some work on FXD.

  1. move attachImagesAndFonts() and TrashIcon() outside of for loop The script wouldn't start on my machine because of this. I dunno if this was intentional, but those functions were inside of a for loop, which means they were getting re-declared at every run of the loop.
  2. move custom_colors and fx_blacklist to their own module this is kind of some low-hanging fruit: it's moving some of the initial declarations into their own modules, and then requiring them as locals wherever they're needed. Probably the first in a series, which's end goal is to remove the bloat of the main file's 8k loc.
  3. setup luarc this file gives indications to lua's language server. It tells it to bring the reaper and ultraschall variables into scope. This is so that vscode doesn't show an error every time you call reaper's api. The file also tells lua to bring Sexan's and Suzuki's dependencies into scope - so that you can get auto-complete for the packages while coding.
BryanChi commented 10 months ago

Hi Tony, Good to hear from you and thanks for the contribution!! : ) for no.1, yes I think it was a mistake, those functions have no business there inside the loop.