I’m curious if it’s possible for packages to customize code indentation?
In Lisp-like languages, proper indentation is essential, since coders don’t actually follow all those parenthesis. Lisp indentation rules are a bit different than most languages though, in that they often rely on custom rules for special forms (like
when, etc.), or on aligning forms across lines. For example, the following snippet is correctly indented Lisp code.
(defun foo(x) (let* ((var nil) (a 2)) ;; Note alignment with above - structure is clear (bar var a) ;; body of "let" traditionally has this indentation (+ (func-a var) (func-b var)))) ;; Again, correct alignment with above form
Is there an API to precisely control indentation in atom? This would be super useful (if not necessary) for codability in Lisp-like languages.
Thanks so much!