New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parindent

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parindent

Indent Clojure files based on the following discussions:

  • 0.1.0
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Parindent

Indent Clojure files based on the following discussions:

  • Daniel Compton's call for a "no config" clojure formatter
  • Nikita Prokopov's proposed simple rules
  • discussion on indentation rules

Install

npm install -g parindent

Try it

To indent all your files in place, run from your project root:

parindent '**/*.{clj,cljs,cljc}' --write

Usage

$ parindent

Usage: parindent [opts] [filename ...]

A minimal indenter for Lisp code (e.g. Clojure)

Available options:
  --write                  Edit the file in-place. (Beware!)
  --list-different or -l   Print filenames of files that are different from Parindent formatting.
  --stdin                  Read input from stdin.
  --version or -v          Print Parindent version.

Current Rules

  • Zero space:
    • Top-level forms
  • One space:
    • Vectors, Maps, Sets
    • Lists that do NOT start with symbol
  • Two space:
    • Lists starting with symbol, whose second line is NOT arg aligned
  • Arg-aligned:
    • Lists starting with symbol, whose second line is arg aligned

To clarify, either of the following formats are chosen, depending on how the baz line is originally formatted:

;; Two space
(foo bar
  baz
  qux)

;; Arg-aligned
(foo bar
     baz
     qux)

FAQs

Package last updated on 15 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc