Full code completion for pilot.lua using JohnnyMorganz' Luau Language Server.
Warning
This repository is being discontinued (for the time being) in favor of Arvid's pilot.lua types for luau-lsp. Features include:
- In-editor descriptions for objects, methods, configurables and events.
- Strict typechecking for Configure and configurables in general.
- Parameter names for event connections
- ArvidSilverlock
Make sure to star their repository if you find it helpful.
To get started, follow these simple steps:
-
Download the Definitions File:
- Head over to the Releases tab.
- Download the latest version of the
pilot.d.lua
file.
-
Install luau-lsp for VSCode:
- Install JohnnyMorganz's luau-lsp extension for Visual Studio Code. (Marketplace link)
-
Create Your Project Folder:
-
Create a folder to put your Waste of Space Project(s), then right click it and
Open With Code
-
Place
pilot.d.lua
in your folder. -
Create a
.vscode
folder in your project directory. -
Inside the
.vscode
folder, create asettings.json
file and paste the following code:{ "luau-lsp.sourcemap.enabled": false, "luau-lsp.types.roblox": true, "luau-lsp.types.definitionFiles": ["./pilot.d.lua"] }
-
Reload the window for the definitions to load. (
CTRL+Shift+P
->Reload Window
)
-
-
Enjoy Full Code Completion:
- With the setup complete, you now have full code completion for
pilot.lua
in Visual Studio Code. - You must have the folder open for autocomplete to work. Opening individual files does not work.
- With the setup complete, you now have full code completion for
If you want to build autopilot.lua from scratch, follow the steps below:
-
Clone the Repository
-
Clone the repository to your local machine
git clone https://github.com/flxwed/autopilot.lua.git
-
-
Generate Definitions via Script
-
Open your cloned repository in your favorite code editor
-
Run
scripts/generateDefinitions.py
and pass the project directory as the first argument. -
After the script finishes, the generated code can be found at
build/pilot.d.lua
.py scripts/generateDefinitions.py . > .\build\pilot.d.lua created successfully cat build/pilot.d.lua > type PortLike = number | {GUID: string} type Properties = {[string]: any} ...
-
We welcome contributions and bug reports. Feel free to fork the repository, make your changes, and submit a pull request. If you encounter any issues or have suggestions for improvement, please open an issue.
If you are having issues with setup, feel free to DM me before opening an issue. (@3nfg
)