Skip to content

Commit bdfa2ea

Browse files
authored
add: introduce luarocks addons (#54)
1 parent 714fa1d commit bdfa2ea

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

src/components/common/Remark.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const classList = [type, "remark", display ?? "block"];
5050
border-style: outset;
5151
margin: 1em auto;
5252
width: fit-content;
53-
box-shadow: var(--remark-color) 1px 1px 0.5em 0px;
53+
box-shadow: var(--remark-color) 0px 0px 0.75em 0px;
5454
border-color: var(--remark-color);
5555
background-color: color-mix(in srgb, var(--remark-color), #071521 80%);
5656

src/content/wiki/addons.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,23 @@ The `config.json` file is very important for addons and must be included. A sche
148148
}
149149
```
150150

151+
## LuaRocks
152+
153+
<Remark type="WIP">
154+
LuaRocks addons are currently in beta. Please report any encountered issues in the [luarocks build backend repo](https://github.com/LuaLS/luarocks-build-addon)!
155+
</Remark>
156+
157+
We'd love feedback with publishing and installing addons via LuaRocks. Using LuaRocks for managing addons should be much more sustainable than the current method (and its independent of editor!). It is very similar to how addons have previously functioned, with some notable changes:
158+
159+
1. The `config.json` file is deprecated, replaced by the `*.rockspec` file.
160+
- `words` and `files` properties are no longer supported.
161+
- `settings` are to be defined in `build.settings` in the `*.rockspec` file
162+
2. Plugins are now automatically discovered and enabled upon addon installation.
163+
3. Addons can depend on each other using the native `dependencies` table of the `*.rockspec` file.
164+
165+
See the [README for the luarocks build backend](https://github.com/LuaLS/luarocks-build-addon#readme) to learn more. Please provide all feedback in that repo. <Icon name="heart" group="solid" color="red"/>
166+
167+
See https://gitlab.com/carsakiller/lls-addon-cc-tweaked as an example, which is a migrated version of the [cc-tweaked addon](https://gitlab.com/carsakiller/cc-tweaked-documentation).
168+
151169
{/* Links */}
152170
[LLS-Addons]: https://github.com/LuaLS/LLS-Addons

src/pages/index.astro

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ const annotationCount = annotationsPage
5353
</div>
5454

5555
<div class="announcement">
56-
<a href="#jetbrains-install">
57-
<span class="tag">NEW</span>
58-
<span class="description">JetBrains IntelliJ Plugin</span>
56+
<a href="/wiki/addons/#luarocks">
57+
<span class="tag">BETA</span><span class="description"
58+
>Install Addons From LuaRocks</span
59+
>
5960
</a>
6061
</div>
6162

@@ -524,10 +525,12 @@ exec &quot;&lt;path-to-directory&gt;/bin/lua-language-server&quot; &quot;$@&quot
524525
.announcement {
525526
width: fit-content;
526527
margin: 1em auto auto auto;
527-
border: 0.1em #2d8ae3 solid;
528528
border-radius: 99em;
529529
background-color: #16436e00;
530-
box-shadow: #16436e 0px 0px 0.5em 0px;
530+
font-size: 1.1em;
531+
padding: 0.2em 0.2em;
532+
background: linear-gradient(90deg, #702fc6 0%, #b710c0 100%);
533+
box-shadow: #b669ff 0px 0px 1em 0px;
531534

532535
a {
533536
color: white;
@@ -538,24 +541,16 @@ exec &quot;&lt;path-to-directory&gt;/bin/lua-language-server&quot; &quot;$@&quot
538541
}
539542

540543
span.tag {
541-
background-color: #2d8ae3;
544+
font-weight: bold;
542545
border-radius: 1em 0px 0px 1em;
543546
position: relative;
544-
padding-left: 0.75em;
545-
546-
&::after {
547-
content: "";
548-
position: absolute;
549-
top: 0px;
550-
right: -0.25em;
551-
width: 0.25em;
552-
height: 100%;
553-
background: linear-gradient(90deg, #2d8ae3, #00000000);
554-
}
547+
padding: 0.2em 0.5em 0.2em 0.75em;
555548
}
556549

557550
span.description {
558-
margin: 0px 0.25em;
551+
margin: 0px;
552+
border-radius: 0px 99em 99em 0px;
553+
border-left: 2px solid white
559554
}
560555
}
561556

0 commit comments

Comments
 (0)