Liking cljdoc? Tell your friends :D

orchard.indent

:style/indent inference.

`:style/indent` inference.
raw docstring

clojure-mode-indents-exactclj

:style/indent rules based on clojure-mode, for names that are short and might be a syllable/word within a larger, unrelated word/phrase.

e.g. are can be part of compare, so are should only be looked for exact matches, not for fuzzy matches.

Uses the modern tuple format shared with clojure-mode and clojure-ts-mode: [[:block N]] — N special args, then body [[:inner D]] — body-style at nesting depth D [[:inner D I]] — body-style at depth D, only at position I

`:style/indent` rules based on clojure-mode, for names that are short
and might be a syllable/word within a larger, unrelated word/phrase.

e.g. `are` can be part of `compare`, so `are` should only be looked for exact matches,
not for fuzzy matches.

Uses the modern tuple format shared with clojure-mode and clojure-ts-mode:
[[:block N]] — N special args, then body
[[:inner D]] — body-style at nesting depth D
[[:inner D I]] — body-style at depth D, only at position I
sourceraw docstring

clojure-mode-indents-fuzzyclj

:style/indent rules based on clojure-mode, for names that are deemed long/unique enough. See clojure-mode-indents-exact for format documentation.

`:style/indent` rules based on clojure-mode, for names that are deemed long/unique enough.
See `clojure-mode-indents-exact` for format documentation.
sourceraw docstring

infer-style-indentclj

(infer-style-indent {:keys [name arglists] :as metadata})

Given a metadata map obtained from a Clojure var object, associates a :style/indent value based on inference (rule of thumb) rules:

  • The macro name is inspected in conjunction with the arglist, in search for an acceptably analog match with a clojure.core counterpart.
  • If that fails, the position of & is observed.
  • Otherwise, the argument names are observed.

The exact inference logic is an implementation detail.

:style/indent will be not associated if no rule matched.

Given a `metadata` map obtained from a Clojure var object,
associates a `:style/indent` value based on inference (rule of thumb) rules:

* The macro name is inspected in conjunction with the arglist,
  in search for an acceptably analog match with a clojure.core counterpart.
* If that fails, the position of `&` is observed.
* Otherwise, the argument names are observed.

The exact inference logic is an implementation detail.

`:style/indent` will be not associated if no rule matched.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close