Clarity Formatter
Last updated
Was this helpful?
Was this helpful?
(define-public (my-func
(amount uint)
(sender principal)
)
(ok true)
)(define-read-only (get-balance (who principal))
(ok u0)
)(let (
(a u1)
(b u2)
)
(body-expression)
)(if condition
(then-expression)
(else-expression)
)
(match optional-value
value (handle-some value)
(handle-none)
);; Input: (tuple (n1 u1) (n2 u2))
;; Output:
{
n1: u1,
n2: u2,
}// settings.json
"[clarity]": {
"editor.formatOnSave": true
}clarinet format --in-placeclarinet format -i 4 -l 120 --in-placeclarinet format --check;; @format-ignore
(define-constant something (list
1 2 3 ;; Preserves custom spacing
4 5 ))