Function: web-mode-lisp-indentation
web-mode-lisp-indentation is a natively compiled function defined in
web-mode.el.
Signature
(web-mode-lisp-indentation POS POINT-CTX)
Source Code
;; Defined in /nix/store/2qgnz1rp30nzfz6w0apx4kdm14if1bbs-emacs-packages-deps/share/emacs/site-lisp/elpa/web-mode-20260831.219/web-mode.el
(defun web-mode-lisp-indentation (pos point-ctx)
(let (offset open-ctx)
(setq open-ctx (web-mode-bracket-up pos "lsp" (plist-get point-ctx :reg-beg)))
;;(message "point-ctx=%S" point-ctx)
;;(message "open-ctx=%S" open-ctx)
(cond
((null (plist-get open-ctx :pos))
(setq offset (plist-get point-ctx :reg-col)))
((member (plist-get point-ctx :curr-char) '(?\( ?\)))
(if (web-mode-looking-at-p "((" (plist-get open-ctx :pos))
(setq offset (+ (plist-get open-ctx :column) 1))
(setq offset (+ (plist-get open-ctx :column) web-mode-code-indent-offset)))
)
(t
(goto-char (plist-get open-ctx :pos))
(forward-char)
(web-mode-rsf "[[:alnum:]-:]+ ")
(setq offset (current-column))
)
) ;cond
offset))