code.manage.unit.snapto

*meta-tags*

dynamic

*ns-forms*

dynamic

*script-forms*

dynamic

*script-option-order*

dynamic

*test-forms*

dynamic

child-entries

added in 4.1

(child-entries block)

returns non-void child blocks together with their starting column

entry-block

added in 4.1

(entry-block entry)

returns the block for an entry

entry-col

added in 4.1

(entry-col entry)

returns the starting column for an entry

fact-block?

added in 4.1

(fact-block? block)

checks if a block is a fact form, preserving reader/block structure

form-op

added in 4.1

(form-op block)

returns the top-level operator of a list form

leading-indent

added in 4.1

(leading-indent line)

counts leading spaces and tabs in a line

normalise-block-string

added in 4.1

(normalise-block-string s)(normalise-block-string s indent)

removes the parent indentation from the rest of a block string

ns-block?

added in 4.1

(ns-block? block)

checks if a block is an ns form

parse-body

added in 4.1

(parse-body blocks)

partitions fact body blocks into plain forms and expression/check pairs

parse-map-pairs

added in 4.1

(parse-map-pairs entries)

partitions map entries into key/value pairs

render-form

added in 4.1

(render-form form)

formats an arbitrary block or form

render-item

added in 4.1

(render-item {:keys [type expr expected]})

formats a plain form or expression/check pair

render-ns-clause

added in 4.1

(render-ns-clause form)

formats a single ns clause

render-prefixed-items

added in 4.1

(render-prefixed-items prefix items suffix separator)(render-prefixed-items prefix items suffix separator render-item-fn)

renders items with aligned continuation

render-script-map

added in 4.1

(render-script-map form)

formats a script config map

render-script-map-pair

added in 4.1

(render-script-map-pair key value prefix-indent)

formats a single script option

render-script-value

added in 4.1

(render-script-value key-entry value-entry)

formats a script option value

script-block?

added in 4.1

(script-block? block)

checks if a block is an l/script* form

script-option-rank

added in 4.1

(script-option-rank entry)

returns the sort rank for a script option

snap-block-string

added in 4.1

(snap-block-string node)

formats supported top-level blocks into snap-to layout

snap-form-string

added in 4.1

(snap-form-string form)

formats a single fact form into snap-to layout

snap-ns-string

added in 4.1

(snap-ns-string form)

formats a single ns form into snap-to layout

snap-script-string

added in 4.1

(snap-script-string form)

formats a single l/script* form into snap-to layout

snapto

added in 4.1

(snapto ns params lookup project)

formats fact tests into a consistent snap-to layout

(project/in-context (snapto {:write false})) => map?

snapto-string

added in 4.1

(snapto-string original)

formats supported top-level forms in a file

spaces

added in 4.1

(spaces n)

returns n spaces

trim-indent

added in 4.1

(trim-indent line n)

removes up to n leading spaces/tabs from a line

unwrap-fact-block

added in 4.1

(unwrap-fact-block block)

returns the exact metadata prefix and inner block