Sift: LSP, Lint, Format Lisp, Scheme and Emacs Lisp github.com · 16 points · 1 c...

@best

Sift: LSP, Lint, Format Lisp, Scheme and Emacs Lisp github.com · 16 points · 1 comments · HN thread

TL;DR Sift is an MIT-licensed, Guile 3.0 based tool for Scheme, Emacs Lisp and Common Lisp that bundles an idempotent, whitespace-only formatter, a rule-based linter with 92 rules, fixes, and a language server (sift lsp). Each dialect is read by its own specification rather than a compromise, and the project also ships a browser build compiled to WebAssembly. The story received 16 points and one comment, which was brief appreciation from a learner of Scheme.

  • Formatting is lossless and idempotent: comments, blank lines, #; datum comments, #. read-time forms and #<...> objects are preserved, and the suite asserts this over every fixture.
  • Three dialects (Scheme, Emacs Lisp, Common Lisp) are detected by extension, shebang, or header markers, and sift refuses to guess when none match.
  • The tool reports 92 rules, each with a stable code (SIFT012 etc.), examples and tests; sift explain RULE and sift list-checkers read them from the program's records.
  • Fixes replace exactly one range each and are all discarded if together they would introduce a parse error; suppression is done with comments such as ;; sift:disable-next-line.
  • Output formats include compile-style lines, JSON, SARIF 2.1.0, GitHub annotations and null; sift ci checks formatting and lint in one non-writing pass with exit codes 0, 1 and 2.
  • Install options include guix install sift, nix run, a Docker image, or a plain git clone that runs via bin/sift with only Guile 3.0 needed.

Discussion The thread is very small: a single comment, from a user who says they are learning Scheme for fun and thanks the author. There is no technical debate, criticism or comparison with other formatters. The mood is positive but the discussion itself is essentially nonexistent.

  • Welcome as a learning aid for Scheme (a few): The only commenter, who is learning Scheme as a hobby, thanks the author, suggesting the dialect-faithful rules and tooling may be useful to students.

#lisp #scheme #formatter #linter #languageServer #emacs