{"id":50605183,"url":"https://github.com/mitranim/lispfmt","last_synced_at":"2026-06-05T22:01:27.378Z","repository":{"id":361684744,"uuid":"1255393090","full_name":"mitranim/lispfmt","owner":"mitranim","description":"Formatter for Common Lisp and Scheme, with a modernized style: fixed-indent, dangling-paren, geared for easier editing.","archived":false,"fork":false,"pushed_at":"2026-05-31T20:59:49.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T21:16:19.373Z","etag":null,"topics":["common-lisp","fmt","formatter","lisp","scheme"],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitranim.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T19:18:04.000Z","updated_at":"2026-05-31T20:59:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mitranim/lispfmt","commit_stats":null,"previous_names":["mitranim/lispfmt"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mitranim/lispfmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Flispfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Flispfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Flispfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Flispfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitranim","download_url":"https://codeload.github.com/mitranim/lispfmt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Flispfmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33961252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"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":["common-lisp","fmt","formatter","lisp","scheme"],"created_at":"2026-06-05T22:01:26.683Z","updated_at":"2026-06-05T22:01:27.373Z","avatar_url":"https://github.com/mitranim.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"`lispfmt` is a fuzzy formatter for Common Lisp and Scheme.\n\nThe style is biased towards structured editing. When a form is already multiline, the formatter spends more lines so child forms can be moved, deleted, or inserted with line-based editor commands.\n\nThe implementation was mostly **bot-prompted** with OpenAI Codex.\n\n## TOC\n\n- [Style](#style)\n- [Examples](#examples)\n- [Usage](#usage)\n- [Make](#make)\n- [Limitations](#limitations)\n\n## Style\n\n- Fixed 2-space indentation.\n- Line endings normalized to LF.\n- In multiline forms, closing delimiters are aligned to opening tokens.\n- Normalized spacing:\n  - One space between adjacent same-line forms.\n  - 0 or 1 blank lines between adjacent multiline forms.\n- Comments are preserved and aligned to code.\n- Nested `#| ... |#` block comments are supported.\n- Reader-like prefix tokens are clamped to the next form where supported.\n- In `def*` forms, signature is placed on the first line.\n- `:key val` pairs when multiline.\n- In calls, function name is always on the first line.\n- `loop` uses heuristics to normalize symbolic keywords to literal `:keywords` where recognized.\n\n## Examples\n\nClosing delimiters placed on separate lines and aligned to openers. Structure is obvious. Forms are easy to move:\n\n```lisp\n(defun some-func ()\n  (let\n    (\n      (one 10)\n      (two 20)\n    )\n    (print (+ one two))\n    (print (+ two one))\n  )\n)\n```\n\nGrouping of `:key val` pairs when multiline:\n\n```lisp\n(dict\n  :one 10\n  :two 20\n  :three 30\n)\n```\n\nIn `loop`, symbolic keywords are normalized to `:keywords` where recognized:\n\n```lisp\n; From:\n(loop for ind below ceil do (print ind))\n; To:\n(loop :for ind :below ceil :do (print ind))\n\n; When multiline:\n(loop\n  :for form\n  :in forms\n  :for index\n  :from 0\n  :do\n  (print form)\n)\n```\n\nBlock comments are treated as forms:\n\n```lisp\n(one\n  #|\n  comment\n  |#\n  two\n)\n```\n\n## Usage\n\nLibrary API:\n\n```lisp\n(lispfmt:format-string string)\n```\n\nReturns a formatted string or signals `lispfmt:formatter-error`.\n\nScript CLI. Currently requires [SBCL](https://www.sbcl.org):\n\n```sh\nsbcl --script cli.lisp \u003c input.lisp \u003e output.lisp\n```\n\nBuilt CLI:\n\n```sh\nmake build\n./lispfmt \u003c input.lisp \u003e output.lisp\n```\n\nThe CLI accepts no arguments. Unsupported arguments, formatter errors, and unexpected errors are written to stderr with a non-zero exit code.\n\n## Make\n\n```sh\nmake test\nmake test_lib\nmake test_cli\nmake build\n```\n\nInstall by symlinking the built executable:\n\n```sh\nmake install\n```\n\nOverride install location:\n\n```sh\nmake install INSTALL_DIR=\"$HOME/bin\"\n```\n\nRemove the symlink:\n\n```sh\nmake uninstall\n```\n\n## Limitations\n\n- Fuzzy CL/Scheme surface formatting, not exact CL or Scheme reader emulation.\n- Mostly CL-biased. Scheme coverage is limited.\n- Not configurable.\n- No CLI options.\n- `loop` support is a set of heuristics, not a full CL `loop` parser.\n\n## License\n\nhttps://unlicense.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Flispfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitranim%2Flispfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Flispfmt/lists"}