Open joaotavora opened 3 years ago
Until this gets fixed, here's another workaround which doesn't require patching the library:
(defun my-custom-auto-fill ()
"Break the line and continue with comment if there's any."
(when (> (current-column) fill-column)
(c-indent-new-comment-line)))
(add-hook 'typescript-mode-hook
(lambda ()
(setq-local auto-fill-function 'my-custom-auto-fill)))
it's not pretty though ...
Wow. Has this been lying around since August? :fearful:
That c-based fix looks doable. Let me fix that up for you.
Should work with c-indent-new-comment-line
with the code in current master now.
So now at least key rebinding should be an option.
To reproduce:
In
something.ts
, this exists:Pressing
M-j
begets:In #41 (sorry, not #42) , a reasonable suggestion is to rebind
M-j
toc-indent-new-comment-line
, but that requires this patch totypescript.el
: