{"id":13895992,"url":"https://github.com/orbitalquark/textadept-format","last_synced_at":"2025-08-31T12:34:31.180Z","repository":{"id":110379764,"uuid":"419934796","full_name":"orbitalquark/textadept-format","owner":"orbitalquark","description":"Code formatting module for Textadept.","archived":false,"fork":false,"pushed_at":"2025-05-23T15:27:48.000Z","size":24,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"default","last_synced_at":"2025-05-23T16:55:38.914Z","etag":null,"topics":["formatter","formatting","textadept","textadept-module"],"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/orbitalquark.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-22T01:59:46.000Z","updated_at":"2025-05-23T15:27:40.000Z","dependencies_parsed_at":"2023-12-31T18:24:09.193Z","dependency_job_id":"317dffce-9a61-49ec-885c-33adc5afae0c","html_url":"https://github.com/orbitalquark/textadept-format","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/orbitalquark/textadept-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitalquark","download_url":"https://codeload.github.com/orbitalquark/textadept-format/tar.gz/refs/heads/default","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-format/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272982497,"owners_count":25025982,"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-31T02:00:09.071Z","response_time":79,"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":["formatter","formatting","textadept","textadept-module"],"created_at":"2024-08-06T18:02:36.092Z","updated_at":"2025-08-31T12:34:31.164Z","avatar_url":"https://github.com/orbitalquark.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# Format\n\nFormat/reformat paragraph and code.\n\nInstall this module by copying it into your *~/.textadept/modules/* directory or Textadept's\n*modules/* directory, and then putting the following in your *~/.textadept/init.lua*:\n\n```lua\nlocal format = require('format')\n```\n\nThere will be an \"Edit \u003e Reformat\" menu.\n\n## Key Bindings\n\nWindows and Linux | macOS | Terminal | Command\n-|-|-|-\n**Edit**| | |\nCtrl+Shift+J | ⌘⇧J | M-S-J | Reformat paragraph\n\n\u003ca id=\"format.code\"\u003e\u003c/a\u003e\n## `format.code`()\n\nReformats using a code formatter for the current buffer's lexer language either the selected\ntext or the current buffer, according to the rules of `textadept.editing.filter_through()`.\n\nSee also: [`format.commands`](#format.commands)\n\n\u003ca id=\"format.commands\"\u003e\u003c/a\u003e\n## `format.commands`\n\nMap of lexer languages to string code formatter commands or functions that return such\ncommands.\n\nFields:\n- `lua`: \n- `cpp`: \n- `go`: \n\n\u003ca id=\"format.ignore_file_patterns\"\u003e\u003c/a\u003e\n## `format.ignore_file_patterns`\n\nList of Lua patterns that match filenames to ignore when formatting on save.\n\nThis is useful for projects with a top-level format config file, but subfolder dependencies\nwhose code should not be formatted on save.\n\nUsage:\n\n```lua\ntable.insert(format.ignore_file_patterns, '/testdata/')\n```\n\n\u003ca id=\"format.ignore_footer_lines\"\u003e\u003c/a\u003e\n## `format.ignore_footer_lines`\n\nList of footer lines to ignore when reformatting paragraphs.\n\nThese can be Doxygen footers for example.\n\nFields:\n- `*/`: \n\nUsage:\n\n```lua\ntable.insert(format.ignore_footer_lines, '\"\"\"')\n```\n\n\u003ca id=\"format.ignore_header_lines\"\u003e\u003c/a\u003e\n## `format.ignore_header_lines`\n\nList of header lines to ignore when reformatting paragraphs.\n\nThese can be LuaDoc/LDoc or Doxygen headers for example.\n\nFields:\n- `---`: \n- `/**`: \n\nUsage:\n\n```lua\ntable.insert(format.ignore_header_lines, '\"\"\"')\n```\n\n\u003ca id=\"format.line_length\"\u003e\u003c/a\u003e\n## `format.line_length`\n\nThe maximum number of characters to allow on a line when reformatting paragraphs.\nThe default\nvalue is 100.\n\n\u003ca id=\"format.on_save\"\u003e\u003c/a\u003e\n## `format.on_save`\n\nInvoke a code formatter on save.\n\nThe default value is `true`.\n\n\u003ca id=\"format.paragraph\"\u003e\u003c/a\u003e\n## `format.paragraph`()\n\nReformats using the Unix `fmt` tool either the selected text or the current paragraph,\naccording to the rules of `textadept.editing.filter_through()`.\n\nFor styled text, paragraphs are either blocks of same-styled lines (e.g. code comments),\nor lines surrounded by blank lines.\nIf the first line matches any of the lines in [`format.ignore_header_lines`](#format.ignore_header_lines), it is not\nreformatted. If the last line matches any of the lines in [`format.ignore_footer_lines`](#format.ignore_footer_lines),\nit is not reformatted.\n\nSee also: [`format.line_length`](#format.line_length)\n\n\u003ca id=\"format.prefix_map\"\u003e\u003c/a\u003e\n## `format.prefix_map`\n\nPrefixes to remap when reformatting paragraphs.\n\nThis is for paragraphs that have a first-line prefix that is different from subsequent\nline prefixes. For example, LuaDoc/LDoc comments start with '---' but continue with '--',\nand Doxygen comments start with '/**' but continue with ' *'.\n\nFields:\n- `[/**]`: \n- `[---]`: \n\nUsage:\n\n```lua\nformat.prefix_map['##'] = '#'\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitalquark%2Ftextadept-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-format/lists"}