;;; misc.el --- Miscellaneous file formats. -*- lexical-binding: t; -*- ;; Time-stamp: <2020-01-26T21:44:47+0100> ;;; Commentary: ;;; Code: (require 'text/common) (use-package conf-mode :mode ("^/etc/conf\\.d/" . conf-mode) ; openrc config files. ("^/etc/portage/package\\.use/" . conf-space-mode) ; Portage config. ("^/etc/portage/package\\.accept_keywords/" . conf-space-mode) ("\\.pc\\(\\.in\\)?$" . conf-mode) ; pkg-config files. ("conanfile\\.txt$" . conf-mode) ; Conan recipes. ) (use-package crontab-mode :custom-face (outline-1 ((t (:inherit outline-1 ; Shrink minutes to normal size. :height 1.0)))) :mode ("/cron\\.d/" . crontab-mode) ("^'/etc/crontab$" . crontab-mode) :hook (crontab-mode . (lambda () (auto-fill-mode -1))) ; No word-wrapping. ) (use-package nginx-mode :defer t ) (use-package company-nginx :after nginx-mode :hook (nginx-mode . company-nginx-keywords) ) (use-package yaml-mode :mode ("\\.yml$" . yaml-mode) ) (use-package mediawiki) (use-package csv-mode :mode ("\\.[Cc][Ss][Vv]$" . csv-mode) ) (use-package adoc-mode :custom-face ;; Style headers. (markup-title-0-face ((t (:inherit markup-gen-face :height 1.4 :weight bold)))) (markup-title-1-face ((t (:inherit markup-gen-face :height 1.3 :weight bold)))) (markup-title-2-face ((t (:inherit markup-gen-face :height 1.2 :weight bold)))) (markup-title-3-face ((t (:inherit markup-gen-face :height 1.1 :weight bold)))) (markup-title-4-face ((t (:inherit markup-gen-face :height 1.0 :weight bold :underline t)))) (markup-title-5-face ((t (:inherit markup-gen-face :height 1.0 :weight bold)))) ;; Enlarge meta-data to the same size as the other text. (markup-meta-face ((t (:inherit font-lock-comment-face)))) (markup-secondary-text-face ((t (:inherit markup-gen-face :height 1.0 :foreground "firebrick")))) (markup-hide-delimiter-face ((t (:inherit markup-meta-face)))) (markup-meta-hide-face ((t (:inherit markup-meta-face)))) ;; Style code snippets (``) (markup-verbatim-face ((t (:background "gray5")))) :mode ("\\.adoc$" . adoc-mode) :hook (adoc-mode . auto-fill-mode) ; Wrap at fill-column. (adoc-mode . (lambda () ; Automatically update date. (setq-local time-stamp-pattern "8/:[dD[aA][tT][eE]: +%Y-%02m-%02d\n") ;; (setq-local time-stamp-time-zone nil) ; Set to local TZ. )) (adoc-mode . yas-minor-mode) ; Enable yasnippets. ) (use-package markdown-mode :custom (markdown-command "cmark") :custom-face ;; Style headers. (markdown-header-face-1 ((t (:inherit markdown-header-face :height 1.4 :weight bold)))) (markdown-header-face-2 ((t (:inherit markdown-header-face :height 1.3 :weight bold)))) (markdown-header-face-3 ((t (:inherit markdown-header-face :height 1.2 :weight bold)))) (markdown-header-face-4 ((t (:inherit markdown-header-face :height 1.1 :weight bold)))) (markdown-header-face-5 ((t (:inherit markdown-header-face :height 1.0 :weight bold :underline t)))) (markdown-header-face-6 ((t (:inherit markdown-header-face :height 1.0 :weight bold)))) (markdown-header-face-7 ((t (:inherit markdown-header-face :height 1.0 :weight bold)))) :mode (("README\\.md$" . gfm-mode) ("\\.md$" . markdown-mode) ("\\.markdown$" . markdown-mode)) :hook (markdown-mode . auto-fill-mode) ; Wrap at fill-column. ) ;; Insert dummy pseudo Latin text. (use-package lorem-ipsum) ;; Document editing, formatting, and organizing mode. (use-package org :custom (org-support-shift-select t) ; Make shift behave normally on text. :bind (:map org-mode-map ; Remove some annoying keybindings. ("M-" . nil) ("M-" . nil) ("M-" . nil) ("M-" . nil) ("M-S-" . nil) ("M-S-" . nil) ("M-S-" . nil) ("M-S-" . nil) ;; ("S-" . nil) ;; ("S-" . nil) ;; ("C-S-" . nil) ;; ("C-S-" . nil) ;; ("S-" . nil) ;; ("S-" . nil) ) ) (use-package sendmail :mode ("/.claws-mail/tmp/tmpmsg\\." . mail-mode) ; claws-mail messages. :hook (mail-mode . (lambda () (set-fill-column 72))) ; Leave space for quoting. ) (provide 'text/misc) ;;; misc.el ends here