Add +default-want-RET-continue-comments option

For disabling comment continuation on RET.
This commit is contained in:
Henrik Lissner 2020-04-30 16:29:12 -04:00
parent a634e2c812
commit 798b5bdaea
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 25 additions and 17 deletions

View file

@ -50,21 +50,6 @@ If `buffer-file-name' isn't set, uses `default-directory'."
(abbreviate-file-name path)
(file-name-nondirectory path)))))
;;;###autoload
(defun +default--newline-indent-and-continue-comments-a ()
"A replacement for `newline-and-indent'.
Continues comments if executed from a commented line, with special support for
languages with weak native comment continuation support (like C-family
languages)."
(interactive)
(if (and (sp-point-in-comment)
comment-line-break-function)
(funcall comment-line-break-function nil)
(delete-horizontal-space t)
(newline nil t)
(indent-according-to-mode)))
(defun doom--backward-delete-whitespace-to-column ()
"Delete back to the previous column of whitespace, or as much whitespace as