Skip to content

Commit 25e1bca

Browse files
committed
doc(README): update example structure to have multiple plugin files
1 parent e3ce164 commit 25e1bca

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ A build backend for installing [lua-language-server](https://github.com/LuaLS/lu
44

55
Its effects are as follows:
66

7-
- Compile a "patch" that describes what settings will be added to LuaLS config files.
8-
- paths can be customized
9-
- Look for LuaLS config files in the project directory by default, prioritizing `./.luarc.json`, then looking for a `./.vscode/settings.json`, and defaulting to creating a new `.luarc.json` otherwise.
10-
- can be customized
11-
- If the `--no-install` option is given, processing stops here.
12-
- Apply the "patch" into every discovered file. File entries may be overwritten
13-
- Install any other assets (`library/` and `plugin.lua`)
7+
- Compile a "patch" that describes what settings will be added to LuaLS config files.
8+
- paths can be customized
9+
- Look for LuaLS config files in the project directory by default, prioritizing `./.luarc.json`, then looking for a `./.vscode/settings.json`, and defaulting to creating a new `.luarc.json` otherwise.
10+
- can be customized
11+
- If the `--no-install` option is given, processing stops here.
12+
- Apply the "patch" into every discovered file. File entries may be overwritten
13+
- Install any other assets (`library/` and `plugin.lua`)
1414

1515
## Usage for End-Users
1616

@@ -19,21 +19,21 @@ Its effects are as follows:
1919
2020
End-users can manage addon installations using the LuaRocks CLI.
2121

22-
- `luarocks install an-addon` - install `an-addon`
23-
- `luarocks remove an-addon` - remove `an-addon`
24-
- `luarocks show an-addon` - view information about `an-addon`
25-
- etc.
22+
- `luarocks install an-addon` - install `an-addon`
23+
- `luarocks remove an-addon` - remove `an-addon`
24+
- `luarocks show an-addon` - view information about `an-addon`
25+
- etc.
2626

2727
Users can also browse addons online from https://luarocks.org/m/lls-addons.
2828

2929
### Variables
3030

3131
You can change the behavior of the installer by defining these variables in a `config-5.X.lua` file or on the command-line as `luarocks VAR=VALUE -- ...`. See the [config file format](https://github.com/luarocks/luarocks/blob/main/docs/config_file_format.md#variables) for more information.
3232

33-
- **LLSADDON_LUARCPATH** (`;`-separated paths) - a list of paths indicating which `.luarc.json`-style files to modify when installing the addon.
34-
- **LLSADDON_VSCSETTINGSPATH** (`;`-separated paths) - a list of paths indicating which `.vscode/settings.json`-style files to modify when installing the addon. This is useful for creating VSCode settings files if they don't exist, since `.luarc.json` usually takes priority. Set this to `.vscode/settings.json` if you want this behavior.
35-
- If at least one of the above variables is set to anything but the empty string, the installer will not look for default config locations. Set to `;` to prohibit modifying any config files.
36-
- **LLSADDON_ABSPATH** (boolean) - If set to any value _other than_ `false`, `no`, `off`, or `0`, any paths added to the config file will be absolute paths instead of relative ones.
33+
- **LLSADDON_LUARCPATH** (`;`-separated paths) - a list of paths indicating which `.luarc.json`-style files to modify when installing the addon.
34+
- **LLSADDON_VSCSETTINGSPATH** (`;`-separated paths) - a list of paths indicating which `.vscode/settings.json`-style files to modify when installing the addon. This is useful for creating VSCode settings files if they don't exist, since `.luarc.json` usually takes priority. Set this to `.vscode/settings.json` if you want this behavior.
35+
- If at least one of the above variables is set to anything but the empty string, the installer will not look for default config locations. Set to `;` to prohibit modifying any config files.
36+
- **LLSADDON_ABSPATH** (boolean) - If set to any value _other than_ `false`, `no`, `off`, or `0`, any paths added to the config file will be absolute paths instead of relative ones.
3737

3838
## Usage for Addon Developers
3939

@@ -43,7 +43,12 @@ Addon developers should use an addon file structure like this:
4343
.
4444
├── [addon name]-[version]-[revision].rockspec # required
4545
├── library/ # optional
46-
└── plugin.lua # optional
46+
│ ├── more-files.lua
47+
│ └── ...
48+
├── plugin.lua # optional
49+
└── plugin/ # optional
50+
├── more-files.lua
51+
└── ...
4752
```
4853

4954
See the [Creating an Addon](https://luals.github.io/wiki/addons/#creating-an-addon) section for more information on the individual components.
@@ -61,7 +66,7 @@ Addons can be developed in a similar way to any other rock. Dependencies to othe
6166

6267
### Build Rules
6368

64-
- **build.settings** (table?) - May contain a key-value dictionary of [settings](https://luals.github.io/wiki/settings/) to be merged into the LuaLS configuration. The `config.json` file will be ignored if this entry exists.
69+
- **build.settings** (table?) - May contain a key-value dictionary of [settings](https://luals.github.io/wiki/settings/) to be merged into the LuaLS configuration. The `config.json` file will be ignored if this entry exists.
6570

6671
### Example
6772

0 commit comments

Comments
 (0)