* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New anchor.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
anchor.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): New anchor.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New anchor.
"Indent rules supported by `c-ts-mode'.
MODE is either `c' or `cpp'."
(let ((common
- `(((parent-is "translation_unit") parent-bol 0)
+ `(((parent-is "translation_unit") point-min 0)
((node-is ")") parent 1)
((node-is "]") parent-bol 0)
((node-is "else") parent-bol 0)
(defvar java-ts-mode--indent-rules
`((java
- ((parent-is "program") parent-bol 0)
+ ((parent-is "program") point-min 0)
((node-is "}") (and parent parent-bol) 0)
((node-is ")") parent-bol 0)
((node-is "]") parent-bol 0)
(let ((common
`(
;; Slam all top level nodes to the left margin
- ((parent-is "program") parent 0)
+ ((parent-is "program") point-min 0)
;; Do not indent here docs or the end. Not sure why it
;; takes the grand-parent but ok fine.
"Rules used for indentation.
Argument LANGUAGE is either `typescript' or `tsx'."
`((,language
- ((parent-is "program") parent-bol 0)
+ ((parent-is "program") point-min 0)
((node-is "}") parent-bol 0)
((node-is ")") parent-bol 0)
((node-is "]") parent-bol 0)