{"id":30028653,"url":"https://github.com/luals/luarocks-build-addon","last_synced_at":"2025-08-06T15:49:15.571Z","repository":{"id":307939206,"uuid":"995639105","full_name":"LuaLS/luarocks-build-addon","owner":"LuaLS","description":"LuaRocks build backend for installing Lua Language Server addons","archived":false,"fork":false,"pushed_at":"2025-08-03T05:43:36.000Z","size":210,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-03T07:09:53.623Z","etag":null,"topics":["lua","luals","luarocks"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuaLS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-03T19:45:19.000Z","updated_at":"2025-08-03T05:43:39.000Z","dependencies_parsed_at":"2025-08-03T07:24:40.276Z","dependency_job_id":null,"html_url":"https://github.com/LuaLS/luarocks-build-addon","commit_stats":null,"previous_names":["luals/luarocks-build-addon"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/LuaLS/luarocks-build-addon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaLS%2Fluarocks-build-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaLS%2Fluarocks-build-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaLS%2Fluarocks-build-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaLS%2Fluarocks-build-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuaLS","download_url":"https://codeload.github.com/LuaLS/luarocks-build-addon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuaLS%2Fluarocks-build-addon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269108001,"owners_count":24361204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","luals","luarocks"],"created_at":"2025-08-06T15:49:14.764Z","updated_at":"2025-08-06T15:49:15.552Z","avatar_url":"https://github.com/LuaLS.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `luarocks-build-lls-addon`\n\nA build backend for installing [lua-language-server](https://github.com/LuaLS/lua-language-server) addons from LuaRocks.\n\nIts effects are as follows:\n\n-   Compile a \"patch\" that describes what settings will be added to LuaLS config files.\n    -   paths can be customized\n-   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.\n    -   can be customized\n-   If the `--no-install` option is given, processing stops here.\n-   Apply the \"patch\" into every discovered file. File entries may be overwritten\n-   Install any other assets (`library/` and `plugin.lua`)\n\n## Usage for End-Users\n\n\u003e [!NOTE]\n\u003e End-users do not need to install `luarocks-build-lls-addon`. That will be done automatically when installing an addon for the first time.\n\nEnd-users can manage addon installations using the LuaRocks CLI.\n\n-   `luarocks install an-addon` - install `an-addon`\n-   `luarocks remove an-addon` - remove `an-addon`\n-   `luarocks show an-addon` - view information about `an-addon`\n-   etc.\n\nUsers can also browse addons online from https://luarocks.org/m/luacats.\n\n### Variables\n\nYou 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.\n\n-   **LLSADDON_LUARCPATH** (`;`-separated paths) - a list of paths indicating which `.luarc.json`-style files to modify when installing the addon.\n-   **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.\n    -   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.\n-   **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.\n\n## Usage for Addon Developers\n\nAddon developers should use an addon file structure like this:\n\n```sh\n.\n├── [addon name]-[version]-[revision].rockspec  # required\n├── library/     # optional\n└── plugin.lua   # optional\n```\n\nSee the [Creating an Addon](https://luals.github.io/wiki/addons/#creating-an-addon) section for more information on the individual components.\n\nA `.rockspec` file should be included with the following block:\n\n```lua\nbuild = {\n    type = \"lls-addon\",\n    -- build rules...\n}\n```\n\nAddons can be developed in a similar way to any other rock. Dependencies to other addons can be specified in the [`dependencies`](https://github.com/luarocks/luarocks/blob/main/docs/rockspec_format.md#dependency-information) table, and general information can be written in the [`description`](https://github.com/luarocks/luarocks/blob/main/docs/rockspec_format.md#package-metadata) table.\n\n### Build Rules\n\n-   **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.\n\n### Example\n\nHere is an example rockspec for [carsakiller's CC:Tweaked type definitions](https://gitlab.com/carsakiller/cc-tweaked-documentation):\n\n```lua\n-- ./luacats-cc-tweaked-1.0.0-1.rockspec\nrockspec_format = \"3.0\"\npackage = \"luacats-cc-tweaked\"\nversion = \"1.0.0-1\"\n\nsource = {\n    url = \"git+https://gitlab.com/carsakiller/cc-tweaked-documentation.git\",\n    branch = \"luarocks-build\", -- this branch does not actually exist\n}\n\ndescription = {\n    summary = \"LuaCATS annotations for CC:Tweaked\",\n    detailed = [[\n        This documentation covers the Lua API for ComputerCraft: Tweaked and is\n        meant to be used with Sumneko's Lua Language Server as it uses its\n        LuaCATS annotation system.\n    ]],\n    homepage = \"https://gitlab.com/carsakiller/cc-tweaked-documentation\",\n    license = \"MIT\",\n}\n\ndependencies = { -- CC:Tweaked has no actual dependencies\n    \"luacats-luafilesystem ~\u003e 1.8\",\n}\n\nbuild = {\n    type = \"lls-addon\",\n    settings = {\n        runtime = {\n            version = \"Lua 5.3\",\n            builtin = {\n                io = \"disable\",\n                os = \"disable\",\n            },\n        },\n    },\n}\n```\n\n### Migrating\n\nA `config.json` file can be included with the addon, but it is considered deprecated when used with this installer. The `words` and `files` fields will not be read, and the `settings` field is superceded by the rockspec's `build.settings` field.\n\n## Building\n\n```sh\n# clone the repository\ngit clone https://github.com/LuaLS/luarocks-build-addon luarocks-build-lls-addon\ncd luarocks-build-lls-addon\n\n# create a project-scoped rocks tree\nluarocks init\n\n# LuaRocks expects all its source code (which includes this addon) to be\n# written for Lua 5.4.\necho 'return \"5.4\"' \u003e .luarocks/default-lua-version.lua\n\n# install the current source in the nearest rocks tree\nluarocks make\n\n# install the current source in the user's rocks tree\n# helpful for testing on local addons\nluarocks --local make\n\n# you can remove it from the user rocks tree with a similar command\nluarocks --local --lua-version=5.4 remove luarocks-build-lls-addon\n```\n\n## Testing\n\n```sh\n# create a project-scoped rocks tree\nluarocks init\n\n# LuaRocks expects all its source code (which includes this addon) to be\n# written for Lua 5.4.\necho 'return \"5.4\"' \u003e .luarocks/default-lua-version.lua\nluarocks test\n\n# report coverage\nluarocks test -- -c\n./luacov.report.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluals%2Fluarocks-build-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluals%2Fluarocks-build-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluals%2Fluarocks-build-addon/lists"}