branch: elpa/typst-ts-mode commit f0916578e4a480107a3b37b5fcab8b4cb3d13d80 Author: Huan Nguyen <nguyenthieuh...@gmail.com> Commit: Huan Nguyen <nguyenthieuh...@gmail.com>
feat: new customize variable that controls behavior of enter key --- typst-ts-mode.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/typst-ts-mode.el b/typst-ts-mode.el index 4b9c39b2ad..0c08b44426 100644 --- a/typst-ts-mode.el +++ b/typst-ts-mode.el @@ -154,6 +154,18 @@ level. See `typst-ts-mode-fontification-precision-level'." :type 'boolean :group 'typst-ts-faces) +(defcustom typst-ts-mode-return-smart t + "Whether return key should behave smart. +Smart as in, automatically insert a new list item when point before +pressing return was on an item. +Pressing return again without inserting a value will remove the list item. +Example: ++ item RETURN ++ |< point is now here +Pressing return again will remove the empty list item." + :type 'boolean + :group 'typst-ts) + (defcustom typst-ts-markup-header-scale '(2.0 1.7 1.4 1.1 1.0 1.0) "Header Scale."