Skip to content

Commit 1fd6ead

Browse files
committed
Update screenshots/gifs + more clearly differentiate installation instructions
1 parent f5fddb7 commit 1fd6ead

File tree

4 files changed

+50
-14
lines changed

4 files changed

+50
-14
lines changed

README.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,57 @@
66
[![Test Coverage Status](https://coveralls.io/repos/github/luttje/glua-api-snippets/badge.svg?branch=main)](https://coveralls.io/github/luttje/glua-api-snippets?branch=main)
77
[![All Contributors](https://img.shields.io/github/all-contributors/luttje/glua-api-snippets?color=ee8449&style=flat-square)](#contributors)
88

9-
This repository scrapes the Garry's Mod Lua API and generates snippets that will help provide autocompletion for Lua in editors like VSCode, NeoVim and more.
9+
This repository scrapes the Garry's Mod Lua API and generates annotated code snippets that will help provide autocompletion for Lua in editors like VSCode, NeoVim and more.
10+
11+
<div align="center">
12+
13+
![VSCode showing autocomplete options from the GLua API while typing code with EmmyLua](docs/demo-autocompletion.gif)
14+
15+
</div>
1016

1117
## 🔨 Usage
1218

13-
1. Install **Lua Language Server:** for your editor of choice:
14-
* [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
15-
* [NeoVim Configuration](https://github.com/LuaLS/lua-language-server#neovim)
19+
To get autocompletion for the Garry's Mod Lua API in your Garry's Mod projects, you need to install the Lua Language Server and our GLua API Definitions.
20+
21+
**First** install **Lua Language Server (LuaLS):** for your editor of choice:
22+
23+
* [Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
1624

17-
2. Open the **Lua Language Server Addon Manager** with the key combination `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS) and search for *Addon*, then select **Lua: Open Addon Manager ...**:
18-
![VSCode editor command suggestion showing: Lua: Open Addon Manager ...](docs/lls-addon-manager-command.jpg)
25+
* [NeoVim Configuration](https://github.com/LuaLS/lua-language-server#neovim)
26+
27+
**Then** download/install our GLua API Definitions for the Lua Language Server. This process varies depending on your editor:
1928

20-
3. Search for the **Garry's Mod** addon and **Enable** it:
21-
![Lua Language Server Addon Manager showing the Garry's Mod addon](docs/lls-addon-manager-gmod.jpg)
29+
* [Visual Studio Code](#visual-studio-code)
30+
31+
* [NeoVim](#neovim)
32+
33+
### Visual Studio Code
34+
35+
Installing our GLua API Definitions for the Lua Language Server in Visual Studio Code is easy thanks to the Lua Language Server Addon Manager built into the VSCode extension.
36+
37+
1. In Visual Studio Code open the Command Palette with the key combination `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS)
2238

23-
4. You will now get autocompletion for the Garry's Mod Lua API in your Garry's Mod projects.
39+
2. Search for *Addon*, then select **`Lua: Open Addon Manager ...`**:
2440

2541
<div align="center">
2642

27-
![VSCode showing autocomplete options from the GLua API while typing code with EmmyLua](docs/demo-autocompletion.gif)
43+
![VSCode editor command suggestion showing: Lua: Open Addon Manager ...](docs/lls-addon-manager-command.jpg)
44+
45+
</div>
46+
47+
3. Search for the **Garry's Mod** addon and **`Enable`** it:
48+
49+
<div align="center">
50+
51+
![Lua Language Server Addon Manager showing the Garry's Mod addon](docs/lls-addon-manager-gmod.jpg)
2852

2953
</div>
3054

31-
*Alternatively download the latest release and include or symlink it into your workspace. Get the release from [🔗 the releases page](https://github.com/luttje/glua-api-snippets/releases) it's named something like `YYYY-MM-DD_HH-MM-SS.lua.zip` .*
55+
### NeoVim
56+
57+
1. Clone (or download and unzip) [our `lua-language-server-addon` branch](https://github.com/luttje/glua-api-snippets/tree/lua-language-server-addon)
58+
59+
2. Follow [the instructions in the Lua Language Server documentation](https://luals.github.io/wiki/addons/#installing-addons) and point `workspace.userThirdParty` to where you placed the `lua-language-server-addon` branch
3260

3361
## 📅 Automatically up-to-date
3462

@@ -40,10 +68,10 @@ A workflow will automatically scrape the latest Garry's Mod Lua API from [the Ga
4068
>
4169
> The Lua Language Server addon might not be immediately updated to align with the definitions in this repository. This delay occurs because we must submit a pull request (PR) to the [Lua Language Server Addons repository (`LuaLS/LLS-Addons`)](https://github.com/LuaLS/LLS-Addons) to update the addon. Subsequently, a maintainer of the `LuaLS/LLS-Addons` repository needs to find time to review and merge the PR.
4270
>
43-
> Our schedule for updating our addon with `LuaLS/LLS-Addons` is set for the first day of each even month, specifically: February, April, June, August, October, and December.
71+
> Our schedule for updating our addon with `LuaLS/LLS-Addons` is set for the first day of February, April, June, August, October, and December.
4472
> This schedule is subject to change based on the availability of maintainers and the urgency of the update.
4573
>
46-
> If you urgently require the most current definitions from the addon, you can expedite the process by submitting a PR to update it. Instructions for doing so can be found in [the `CONTRIBUTING.md` file](https://github.com/luttje/glua-api-snippets/blob/main/CONTRIBUTING.md#updating-the-addon-for-lua-language-server).
74+
> If you urgently require the most current definitions from the addon, you can expedite the process by submitting a PR to update it yourself. Instructions for doing so can be found in [the `CONTRIBUTING.md` file](https://github.com/luttje/glua-api-snippets/blob/main/CONTRIBUTING.md#updating-the-addon-for-lua-language-server).
4775
4876
## 🤖 Advanced Usage
4977

@@ -63,7 +91,15 @@ This project uses [Jest](https://jestjs.io/) to automate testing. You can run th
6391

6492
### API as JSON
6593

66-
The API is also available as JSON. You can find it with the Lua API package [on the releases page](https://github.com/luttje/glua-api-snippets/releases). It is named something like `YYYY-MM-DD_HH-MM-SS.json.zip`.
94+
The API is also available as JSON. You can find it with the Lua API package on [🔗 the releases page](https://github.com/luttje/glua-api-snippets/releases). It is named something like `YYYY-MM-DD_HH-MM-SS.json.zip`.
95+
96+
### Manual Installation
97+
98+
If you cannot or do not want to use Lua Language Server:
99+
100+
1. Download and unzip the latest release from [🔗 the releases page](https://github.com/luttje/glua-api-snippets/releases), it's named something like `YYYY-MM-DD_HH-MM-SS.lua.zip`
101+
102+
2. Include or symlink the unzipped directory into your workspace
67103

68104
## Contributors
69105

docs/demo-autocompletion.gif

-71.8 KB
Loading

docs/lls-addon-manager-command.jpg

7.4 KB
Loading

docs/lls-addon-manager-gmod.jpg

-3.56 KB
Loading

0 commit comments

Comments
 (0)