{"id":13683026,"url":"https://github.com/numToStr/lemmy-help","last_synced_at":"2025-04-30T10:30:40.379Z","repository":{"id":39995320,"uuid":"479972160","full_name":"numToStr/lemmy-help","owner":"numToStr","description":"Every one needs help, so lemmy-help you! A CLI to generate vim/nvim help doc from emmylua","archived":false,"fork":false,"pushed_at":"2023-11-17T14:15:06.000Z","size":241,"stargazers_count":146,"open_issues_count":12,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-26T20:39:27.333Z","etag":null,"topics":["cli","emmylua","lua","neovim","neovim-plugin","parser","rust","vim-help"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/numToStr.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-04-10T09:36:43.000Z","updated_at":"2024-10-24T11:30:00.000Z","dependencies_parsed_at":"2023-11-17T16:06:49.271Z","dependency_job_id":null,"html_url":"https://github.com/numToStr/lemmy-help","commit_stats":{"total_commits":156,"total_committers":2,"mean_commits":78.0,"dds":0.2435897435897436,"last_synced_commit":"98954944ba0e6f7cc8425ee45bfe0b85519b42d6"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numToStr%2Flemmy-help","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numToStr%2Flemmy-help/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numToStr%2Flemmy-help/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numToStr%2Flemmy-help/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numToStr","download_url":"https://codeload.github.com/numToStr/lemmy-help/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223870329,"owners_count":17217347,"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":["cli","emmylua","lua","neovim","neovim-plugin","parser","rust","vim-help"],"created_at":"2024-08-02T13:01:57.812Z","updated_at":"2024-11-12T02:32:53.249Z","avatar_url":"https://github.com/numToStr.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003e🤝 lemmy-help\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003csup\u003eEveryone needs help, so lemmy-help you\u003c/sup\u003e\u003c/p\u003e\n\n![lemmy-help](https://user-images.githubusercontent.com/24727447/164423469-b26fea39-2ef7-497c-8156-5a4c01bc30f8.gif \"Generating help docs\")\n\n### What?\n\n`lemmy-help` is a emmylua parser as well as a CLI which takes that parsed tree and converts it into vim help docs.\n\n### Installation\n\n- Using `cargo`\n\n```bash\ncargo install lemmy-help --features=cli\n```\n\n- Arch Linux\n\n```bash\n# Using yay\nyay -S lemmy-help\n\n# Using paru\nparu -S lemmy-help\n```\n\n- Using releases\n\nCheck out the [release page](https://github.com/numToStr/lemmy-help/releases) for prebuild binaries available for different operating systems.\n\n### Emmylua\n\nTo properly generate docs you should follow emmylua spec. The parser is capable of parsing most (not all) of the emmylua syntax. You can read the following doc which can give you the idea on how to properly write emmylua comments.\n\n- [Writing emmylua docs](./emmylua.md)\n\n### Usage\n\nUsing the CLI is simple just give it the path to the lua files; it will parse them and prints help doc onto **stdout**\n\n```bash\nlemmy-help /path/to/{first,second,third}.lua \u003e doc/PLUGIN_NAME.txt\n```\n\n### Cli\n\n```text\nlemmy-help\n\nUSAGE:\n    lemmy-help [FLAGS] [OPTIONS] \u003cFILES\u003e...\n\nARGS:\n    \u003cFILES\u003e...                  Path to lua files\n\nFLAGS:\n    -h, --help                  Print help information\n    -v, --version               Print version information\n    -M, --no-modeline           Don't print modeline at the end\n    -f, --prefix-func           Prefix function name with ---@mod name\n    -a, --prefix-alias          Prefix ---@alias tag with return/---@mod name\n    -c, --prefix-class          Prefix ---@class tag with return/---@mod name\n    -t, --prefix-type           Prefix ---@type tag with ---@mod name\n        --expand-opt            Expand '?' (optional) to 'nil' type\n\nOPTIONS:\n    -i, --indent \u003cu8\u003e           Controls the indent width [default: 4]\n    -l, --layout \u003clayout\u003e       Vimdoc text layout [default: 'default']\n                                - \"default\" : Default layout\n                                - \"compact[:n=0]\" : Aligns [desc] with \u003ctype\u003e\n                                  and uses {n}, if provided, to indent the\n                                  following new lines. This option only\n                                  affects ---@field and ---@param tags\n                                - \"mini[:n=0]\" : Aligns [desc] from the start\n                                  and uses {n}, if provided, to indent the\n                                  following new lines. This option affects\n                                  ---@field, ---@param and ---@return tags\n\nUSAGE:\n    lemmy-help /path/to/first.lua /path/to/second.lua \u003e doc/PLUGIN_NAME.txt\n    lemmy-help -c -a /path/to/{first,second,third}.lua \u003e doc/PLUGIN_NAME.txt\n    lemmy-help --layout compact:2 /path/to/plugin.lua \u003e doc/PLUGIN_NAME.txt\n\nNOTES:\n    - The order of parsing + rendering is relative to the given files\n```\n\n### CI\n\n```yaml\nname: lemmy-help\n\non: [push]\n\nenv:\n  PLUGIN_NAME: plugin-name\n\njobs:\n  docs:\n    runs-on: ubuntu-latest\n    name: emmylua to vimdoc\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Generating help\n        run: |\n          curl -Lq https://github.com/numToStr/lemmy-help/releases/latest/download/lemmy-help-x86_64-unknown-linux-gnu.tar.gz | tar xz\n          ./lemmy-help [args] \u003cpath\u003e \u003e doc/${{env.PLUGIN_NAME}}.txt\n\n      - name: Commit\n        uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          branch: ${{ github.head_ref }}\n          commit_message: \"chore(docs): auto-generate vimdoc\"\n          file_pattern: doc/*.txt\n```\n\n### Credits\n\n- TJ's [docgen](https://github.com/tjdevries/tree-sitter-lua#docgen) module\n- [mini.doc](https://github.com/echasnovski/mini.nvim#minidoc) from `mini.nvim` plugin\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FnumToStr%2Flemmy-help","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FnumToStr%2Flemmy-help","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FnumToStr%2Flemmy-help/lists"}