]> git.eshelyaron.com Git - emacs.git/commit
Add comment indent and filling to other tree-sitter major modes
authorYuan Fu <casouri@gmail.com>
Sun, 25 Dec 2022 19:21:50 +0000 (11:21 -0800)
committerYuan Fu <casouri@gmail.com>
Mon, 26 Dec 2022 09:47:55 +0000 (01:47 -0800)
commit28f26b11a1ebd46b9f599babf843f91871efb629
tree8c2f4e2abdfd01babc16c71a511a8f4272708dfc
parentc6b02826450e3d40b4a2ea4e6026a813d3679d8d
Add comment indent and filling to other tree-sitter major modes

Extract the setup into a function, and use it in other major modes.

* lisp/progmodes/c-ts-mode.el (c-ts-mode-comment-setup): New function.
(c-ts-base-mode): Extract out.
(c-ts-mode)
(c++-ts-mode): Remove old setup.

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--indent-rules): New
indent rules.
(csharp-ts-mode): Use new setup function.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
indent rules.
(java-ts-mode): Use new setup function.
* lisp/progmodes/js.el (js--treesit-indent-rules): New indent rules.
(js-ts-mode): Use new setup function.
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--indent-rules): New
indent rules.
(rust-ts-mode): Use new setup function.
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--indent-rules): New indent rules.
(typescript-ts-base-mode): Use new setup function.
lisp/progmodes/c-ts-mode.el
lisp/progmodes/csharp-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/rust-ts-mode.el
lisp/progmodes/typescript-ts-mode.el