Luna creates a module containing all your modules, and keeps it updated as you edit your project. I will call the module 'Library' in this tutorial but you can configure it to whatever you like. The extension works as a module loader, but with intellisense.
You have to use Rojo in your project for this to work.
For intellisene you have to use something like Roblox LSP.
- Install the extension here.
- Run the 'Luna: Open Menu' command.
- Select 'Start Luna' and a configuration file will be generated for you to edit. See below for information about the config.
- After customizing the configuration select 'Start Luna' again to start it.
- You can now start using it!
-- Require the Library created by the extension, the path depends
-- on your "modulePath" property and your Rojo project configuratin.
local Library = require(game:GetService("ReplicatedStorage").Library)
Library.MyModule.Say("Hello") -- This will now have intellisense unlike normal module loaders.
||Path of the module to generate
||Name of your rojo project
||Variable name of the Library in your own scripts, used for dependency checking
||The directories you want to use, a global one is added by default but here you can customize your own. path is the folder path in your project. restricted can be either false, "CLIENT" or "SERVER". makeCategory will put the modules in their own directory in the Library, for example: Library.Utils.Add() instead of Library.Add(). loadOrder is in which order it should be loaded.
||See example below
Paths in the config are file paths in your project, not game paths.
After configuring your project the extension will automatically start when you open it the next time.
If you need help you can add me on discord Ezzenix#5500.