35 lines
1.2 KiB
EmacsLisp
35 lines
1.2 KiB
EmacsLisp
|
;;; earnemod-markdown.el --- -*- lexical-binding: t; -*-
|
||
|
|
||
|
;; Copyright (C) 2020-2021 earnest ma
|
||
|
;; SPDX-License-Identifier: MIT
|
||
|
;; Author: earnest ma <me@earne.link>
|
||
|
|
||
|
;;; Code:
|
||
|
(use-package markdown-mode
|
||
|
:mode (("README\\.md\\'" . gfm-mode)
|
||
|
("\\.md\\'" . markdown-mode))
|
||
|
:config
|
||
|
;; Hooks:
|
||
|
;; Visual line wrapping
|
||
|
(add-hook 'markdown-mode-hook 'visual-line-mode)
|
||
|
;; Font
|
||
|
(add-hook 'markdown-mode-hook 'variable-pitch-mode)
|
||
|
;; Center text
|
||
|
(add-hook 'markdown-mode-hook 'olivetti-mode)
|
||
|
;; Line breaks
|
||
|
(add-hook 'markdown-mode-hook 'auto-fill-mode)
|
||
|
|
||
|
;; Font settings
|
||
|
(custom-theme-set-faces
|
||
|
'user
|
||
|
'(markdown-code-face ((t (:inherit fixed-pitch))))
|
||
|
'(markdown-header-face-1 ((t (:inherit variable-pitch :height 1.9))))
|
||
|
'(markdown-header-face-2 ((t (:inherit variable-pitch :height 1.7))))
|
||
|
'(markdown-header-face-3 ((t (:inherit variable-pitch :height 1.55))))
|
||
|
'(markdown-header-face-4 ((t (:inherit variable-pitch :height 1.4))))
|
||
|
'(markdown-header-face-5 ((t (:inherit variable-pitch :height 1.3))))
|
||
|
'(markdown-header-face-6 ((t (:inherit variable-pitch :height 1.25))))))
|
||
|
|
||
|
(provide 'earnemod-markdown)
|
||
|
;;; earnecore-markdown.el ends here
|