lang/ocaml: ensure * in block comments are padded
(* * <-- ensures there is at least one space here *)
This commit is contained in:
parent
c14a4c8818
commit
56393420e5
2 changed files with 13 additions and 0 deletions
9
modules/lang/ocaml/autoload.el
Normal file
9
modules/lang/ocaml/autoload.el
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
;;; lang/ocaml/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +ocaml/comment-indent-new-line ()
|
||||||
|
"Break line at point and indent, continuing comment if within one."
|
||||||
|
(interactive)
|
||||||
|
(comment-indent-new-line)
|
||||||
|
(when (eq (char-before) ?*)
|
||||||
|
(just-one-space)))
|
|
@ -21,6 +21,10 @@
|
||||||
(when (featurep! :tools flyspell)
|
(when (featurep! :tools flyspell)
|
||||||
(add-hook 'tuareg-mode-local-vars-hook #'flyspell-prog-mode))
|
(add-hook 'tuareg-mode-local-vars-hook #'flyspell-prog-mode))
|
||||||
|
|
||||||
|
;; Ensure asterixes in block comments have at least one space of indentation
|
||||||
|
(setq-hook! 'tuareg-mode-hook
|
||||||
|
comment-line-break-function #'+ocaml/comment-indent-new-line)
|
||||||
|
|
||||||
|
|
||||||
(def-package! merlin
|
(def-package! merlin
|
||||||
:unless (featurep! +lsp)
|
:unless (featurep! +lsp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue