Skip to content

KeyWeeUsr/conventional

Repository files navigation

conventional

MELPA MELPA Stable CI Coverage Status Buy me a coffee Liberapay PayPal

A collection of minor modes supporting Conventional syntax.

Currently available:

How to

Clone and install manually, then simply:

  • M-x conventional-comments-mode
  • M-x conventional-commits-mode

Enable for commit editing in Emacs

With EDITOR environment variable or git core.editor set up for Emacs a temporary file is available for editors external to git for convenient commit message writing. Normally it's ./.git/COMMIT_EDITMSG and in ncombination with find-file-hook one can listen for buffer's name and enable the mode for conventional commits like this:

(add-hook
 'find-file-hook
 (lambda (&rest _)
   (if (string= (file-name-base buffer-file-name) "COMMIT_EDITMSG")
       (conventional-commits-mode)
     (conventional-comments-mode))))