Skip to content

Commit ee7a858

Browse files
committed
rephrase and reformat
1 parent 1c960a2 commit ee7a858

1 file changed

Lines changed: 30 additions & 22 deletions

File tree

autocompletion.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,50 @@
22
order: 92
33
icon: zap
44
---
5-
# Auto Completion & Intellisense
5+
# Auto Completion & IntelliSense
6+
To enhance your development experience with LuaLink, it is recommended to set up auto completion with IntelliSense.
67

7-
<details>
8-
<summary><strong>VSCode / VSCodium Setup</strong></summary>
8+
Getting this up and running is really simple. Choose your IDE and follow instructions below:
99

10-
If you want auto completion and intellisense for LuaLink scripts in VSCode (or VSCodium), follow these simple steps:
10+
=== **Visual Studio Code** &ensp; | &ensp; **VSCodium**
1111

12-
### 1. Install the Lua Extension
12+
<br>
1313

14-
- Install the **sumneko Lua** extension:
15-
- [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
16-
- [Open VSX](https://open-vsx.org/extension/sumneko/lua)
14+
#### 1. Install Lua Extension
15+
Download and install **sumneko Lua** extension. You can do this manually, or use built-in extension manager if available.
1716

18-
### 2. Get the LuaLink LLS Addon
17+
{.list-icon}
18+
- **Trusted Sources**
19+
- [**:icon-link: VSCode Marketplace** (marketplace.visualstudio.com)](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
20+
- [**:icon-link: Open VSX** (open-vsx.org)](https://open-vsx.org/extension/sumneko/lua)
1921

20-
- Clone (recommended) or download [LuaLink/lualink-lls-addon](https://github.com/LuaLink/lualink-lls-addon)
21-
- Cloning is recommended so you can update it easily:
22-
```bash
23-
git clone https://github.com/LuaLink/lualink-lls-addon
24-
```
22+
---
23+
24+
#### 2. Get LuaLink LLS Addon
25+
Clone or download [**our addon**](https://github.com/LuaLink/lualink-lls-addon). It contains Lua stubs for common Java and Bukkit types and enables auto-completion of class names.
26+
27+
Cloning is recommended so you can update it easily.
28+
```bash
29+
git clone https://github.com/LuaLink/lualink-lls-addon
30+
```
31+
Updating is as simple as executing `git pull` inside the cloned directory.
32+
33+
**Note**: Stubs are based on JDK 21 and latest Paper API snapshot. Repository is updated on daily basis so if recently added API is missing, just pull changes from remote or download and replace files manually.
2534

26-
### 3. Configure the Extension
35+
---
36+
37+
#### 3. Configure Lua Extension
38+
The last step is to configure **sumneko Lua** extension to make it recognize and index downloaded Lua stubs, and use our runtime plugin.
2739

2840
- Open the settings for the Lua extension.
2941
- Add a new entry to `Lua.workspace.library` and enter the path to your `lualink-lls-addon` folder.
3042
- Set `Lua.runtime.plugin` to `lualink-lls-addon/plugin.lua`.
3143
- This setting requires editing the `settings.json` for the extension directly.
3244

33-
#### Note
34-
35-
It *should* be possible to just add the `lualink-lls-addon` folder to `Lua.workspace.userThirdParty` and have the plugin load only for LuaLink scripts, but in testing this didn't work. If you figure it out, please open an issue or join our Discord!
36-
37-
### Done!
45+
**Note**: It *should* be possible to just add the `lualink-lls-addon` folder to `Lua.workspace.userThirdParty` and have the plugin load only for LuaLink scripts. We could never get this to work however. So if you figure it out - please [open a new issue](https://github.com/LuaLink/docs/issues) or [join our Discord](https://discord.gg/xYcjBKqkDz).
3846

39-
If you did everything right, you should now get auto completion and intellisense for LuaLink in your Lua files. This should make developing scripts much easier!
47+
===
4048

41-
</details>
49+
**Not working?** [Join our Discord server](https://discord.gg/xYcjBKqkDz) and ask for help. We will do our best to help you set it up.
4250

4351
<!-- Add more IDE instructions below as needed -->

0 commit comments

Comments
 (0)