{"id":16207941,"url":"https://github.com/applejag/cc-tweaked-emmylua","last_synced_at":"2025-04-07T20:22:08.016Z","repository":{"id":96517162,"uuid":"484747556","full_name":"applejag/CC-Tweaked-EmmyLua","owner":"applejag","description":"EmmyLua annotations for CC-Tweaked","archived":false,"fork":false,"pushed_at":"2022-04-24T09:37:26.000Z","size":752,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T22:17:07.172Z","etag":null,"topics":["cc-tweaked","emmylua","lua"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/applejag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-04-23T12:56:21.000Z","updated_at":"2025-02-28T04:43:45.000Z","dependencies_parsed_at":"2023-03-24T23:17:55.020Z","dependency_job_id":null,"html_url":"https://github.com/applejag/CC-Tweaked-EmmyLua","commit_stats":null,"previous_names":["applejag/cc-tweaked-emmylua"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2FCC-Tweaked-EmmyLua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2FCC-Tweaked-EmmyLua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2FCC-Tweaked-EmmyLua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2FCC-Tweaked-EmmyLua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applejag","download_url":"https://codeload.github.com/applejag/CC-Tweaked-EmmyLua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247722041,"owners_count":20985116,"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","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":["cc-tweaked","emmylua","lua"],"created_at":"2024-10-10T10:14:51.705Z","updated_at":"2025-04-07T20:22:07.995Z","avatar_url":"https://github.com/applejag.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CC-Tweaked EmmyLua Annotations\n\nBased on CC-Tweaked v1.100.4 for Minecraft 1.18.2.\nManually scraped from the docs: \u003chttps://tweaked.cc/\u003e.\n\n## What this repo does\n\nWhen installed correctly, this will add intellisense/autocompletions and basic\ndocumentation right into your editor by showing:\n\n- Help text\n- Parameter types\n- API method names\n\nIt does this by declaring EmmyLua annotations (docs: \u003chttps://github.com/sumneko/lua-language-server/wiki/EmmyLua-Annotations\u003e)\nthat the lua-language-server made by Sumneko reads to provide intellisense.\nSumneko's language server is available in:\n\n- VS Code: \u003chttps://marketplace.visualstudio.com/items?itemName=sumneko.lua\u003e\n- VS Codium: \u003chttps://open-vsx.org/extension/sumneko/lua\u003e\n- (Neo)vim: \u003chttps://github.com/xiyaowong/coc-sumneko-lua\u003e (via [coc.nvim](https://github.com/neoclide/coc.nvim))\n\n## Preview\n\n### VS Code\n\n![](assets/screenshot-vscode-1.png)\n![](assets/screenshot-vscode-2.png)\n\n### (Neo)vim\n\n![](assets/screenshot-nvim-1.png)\n![](assets/screenshot-nvim-2.png)\n\n## Install Lua-language-server\n\nJust install the VS Code/coc.nvim extension and everything should work fine:\n\n- VS Code: \u003chttps://marketplace.visualstudio.com/items?itemName=sumneko.lua\u003e\n\n- VS Codium: \u003chttps://open-vsx.org/extension/sumneko/lua\u003e\n\n- coc.nvim: `:CocInstall coc-sumneko-lua`\n\n## Install files\n\nClone this repo to somewhere nice, such as your documents folder:\n\n```sh\ncd ~/Documents\ngit clone https://github.com/jilleJr/CC-Tweaked-EmmyLua.git\n```\n\nGet the full path of the cloned repository on your disk, as we will use it\nin the config in the section below:\n\n## Configure language server\n\nOpen your editors config file. For coc.nvim, you would run:\n\n```vim\n:CocConfig\n```\n\nAdd the following fields, but ensure the `Lua.workspace.library` is the\ncorrect path to the cloned CC-Tweaked-EmmyLua repo:\n\n```json\n{\n    \"Lua.workspace.library\": [\n        \"/home/yourname/Documents/CC-Tweaked-EmmyLua\"\n    ],\n    \"Lua.workspace.maxPreload\": 2000,\n    \"Lua.workspace.preloadFileSize\": 1000,\n    \"Lua.runtime.version\": \"Lua 5.1\",\n    \"Lua.runtime.builtin\": {\n        \"os\": \"disable\",\n        \"io\": \"disable\"\n    },\n    \"Lua.diagnostics.enable\": true,\n    \"Lua.diagnostics.globals\": [],\n    \"Lua.diagnostics.disable\": [\n        \"lowercase-global\"\n    ],\n    \"Lua.completion.keywordSnippet\": \"Disable\",\n    \"Lua.telemetry.enable\": false\n}\n```\n\n## Existing documentation\n\n- [x] Globals:\n\n  - [x] \\_G\n  - [x] colors\n  - [x] colours\n  - [x] commands\n  - [x] disk\n  - [x] fs\n  - [x] gps\n  - [x] help\n  - [x] http\n  - [x] io\n  - [x] keys\n  - [x] multishell\n  - [x] os\n  - [x] paintutils\n  - [x] parallel\n  - [x] peripheral\n  - [x] pocket\n  - [x] rednet\n  - [x] redstone\n  - [x] settings\n  - [x] shell\n  - [x] term\n  - [x] textutils\n  - [x] turtle\n  - [x] vector\n  - [x] window\n\n- [x] Modules:\n\n  - [x] cc.audio.dfpwm\n  - [x] cc.completion\n  - [x] cc.expect\n  - [x] cc.image.nft\n  - [x] cc.pretty\n  - [x] cc.require\n  - [x] cc.shell.completion\n  - [x] cc.strings\n\n- [x] Peripherals:\n\n  - [x] command\n  - [x] computer\n  - [x] drive\n  - [x] modem\n  - [x] monitor\n  - [x] printer\n  - [x] speaker\n\n- [x] Generic peripherals:\n\n  - [x] energy\\_storage\n  - [x] fluid\\_storage\n  - [x] inventory\n\n## Install on NixOS\n\nIn case you get the following symptom:\n\n```console\n$ ls\nlua-language-server\nmain.lua\n\n$ ./lua-language-server\nbash: no such file or directory: ./lua-language-server\n```\n\nIt might be something wrong with the VS Code provided binary together with how\nNixOS stores its library files.\n\nCan be resolved by installing it from nixpkgs instead:\n\n```sh\nnix-env -i sumneko-lua-language-server\n```\n\nThen override the one in the extension with the NixOS variant:\n\n```sh\n# For VS Code:\ncp $(which lua-language-server) ~/.vscode/extensions/sumneko.lua-*/server/bin/Linux/lua-language-server\n\n# For VS Codium:\ncp $(which lua-language-server) ~/.vscode-oss/extensions/sumneko.lua-*/server/bin/Linux/lua-language-server\n\n# For coc.nvim:\n# 1. First open a .lua file and tell it to download the language server\n# 2. Run the following command:\ncp $(which lua-language-server) ~/.config/coc/extensions/coc-sumneko-lua-data/sumneko-lua-ls/extension/server/bin/lua-language-server\n```\n\nAnd then restart your editor.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplejag%2Fcc-tweaked-emmylua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplejag%2Fcc-tweaked-emmylua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplejag%2Fcc-tweaked-emmylua/lists"}